From: Marco Atzeri <marco.atzeri@gmail.com>
To: "cygwin-apps@cygwin.com" <cygwin-apps@cygwin.com>
Cc: alois.schloegl@gmail.com
Subject: Re: newcomer issues when packaging biosig,stimfit, etc.
Date: Sat, 8 Jan 2022 20:15:28 +0100 [thread overview]
Message-ID: <44c5a1de-dbfe-625d-8ff8-049d8047277e@gmail.com> (raw)
In-Reply-To: <dffefb30-94b4-392a-793d-1d723551f820@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
following on cygwin-apps
On 08.01.2022 18:41, Marco Atzeri wrote:
> On 08.01.2022 18:34, Alois Schlögl wrote:
>> Dear Cygwin community,
>>
>
> Hi Alois,
>
>> I intend to package Stimfit [1] and Biosig [2] (and perhaps
>> libb64,libbiosig,sigviewer) for cygwin. The packages are already
>> available in Debian, but when trying to package them for cygwin, I run
>> into some difficulties.
>> I read the documentation [3-5], but I got stuck, and I'd appreciate
>> your help on this. Attached are my current versions of *.cygports and
>> *.hint files
>
> please subscribe to cygwin-apps.
> The discussion about maintainership and packaging are handled there
>
I looked on libb64, as it is not using autoconf/automake
you can not use the default src_* but you need to define them.
As the Makefile is building only static lib and has no install
procedure I modified to build only shared and I used
cygport for the installation.
I also separated the test.
See attached update cygport and patch.
[-- Attachment #2: libb64.cygport --]
[-- Type: text/plain, Size: 1039 bytes --]
# package name
NAME="libb64"
VERSION=1.2.1
RELEASE=1
# .hint generation
CATEGORY="Libs"
SUMMARY="libary for base64-encoding"
DESCRIPTION="A library of ANSI C routines for fast
encoding/decoding data into and from a base64-encoded format"
SRC_URI="https://sourceforge.net/projects/libb64/files/libb64/libb64/libb64-${PV}.zip"
PKG_NAMES="libb64 libb64-devel libb64-util"
libb64_util_CONTENTS="usr/bin/base64.exe"
libb64_CONTENTS="usr/bin/cygb64.dll"
libb64_devel_CONTENTS="
usr/share/doc/
usr/include
usr/lib
"
DIFF_EXCLUDES="depend"
# use not standard src_compile, src_install and src_test
src_compile() {
cd ${S}
lndirs
cd ${B}
make
}
src_install() {
cd ${D}
dodir usr/include/b64
insinto /usr/include/b64
doins ${S}/include/b64/*
dobin ${B}/base64/base64.exe
dobin ${B}/src/cygb64.dll
dolib ${B}/src/libb64.dll.a
dodir usr/share/b64/examples
insinto usr/share/b64/examples
dodoc ${S}/examples/*.c ${S}/examples/*.txt ${S}/examples/README.md
}
src_test() {
cd ${B}
make -C examples test
}
[-- Attachment #3: libb64-1.2.1-1.src.patch --]
[-- Type: text/plain, Size: 1993 bytes --]
--- origsrc/libb64-1.2.1/base64/Makefile 2013-06-18 14:49:36.000000000 +0200
+++ src/libb64-1.2.1/base64/Makefile 2022-01-08 19:42:26.156240800 +0100
@@ -34,10 +34,8 @@ vpath %.a ../src
all: $(TARGETS) #strip
-base64: libb64.a
-
-strip:
- strip $(BINARIES) *.exe
+base64: ../src/cygb64.dll
+ g++ $(CXXFLAGS) $(SOURCES) -L../src -lb64 -o $@
clean: clean_VisualStudioProject
rm -f *.exe* *.o $(TARGETS) *.bak *~
--- origsrc/libb64-1.2.1/examples/Makefile 2013-06-18 14:49:36.000000000 +0200
+++ src/libb64-1.2.1/examples/Makefile 2022-01-08 20:12:21.021189700 +0100
@@ -19,9 +19,13 @@ vpath %.a ../src
.PHONY : clean
-all: $(TARGETS) test
+all: $(TARGETS)
-c-example1 c-example2: libb64.a
+c-example1: ../src/cygb64.dll
+ gcc $(CXXFLAGS) c-example1.c -L../src -lb64 -o $@
+
+c-example2: ../src/cygb64.dll
+ gcc $(CXXFLAGS) c-example2.c -L../src -lb64 -o $@
clean:
rm -f *.exe* *.o $(TARGETS) $(DEBRIS) *.bak *~
@@ -33,10 +37,10 @@ depend: $(SOURCES)
makedepend -f- $(CFLAGS) $(SOURCES) 2> /dev/null 1> depend
test-c-example1: c-example1
- ./c-example1
+ PATH=$(PWD)/src:$(PATH) ./c-example1
test-c-example2: c-example2
- ./c-example2 loremgibson.txt encoded.txt decoded.txt
+ PATH=$(PWD)/src:$(PATH) ./c-example2 loremgibson.txt encoded.txt decoded.txt
diff -q loremgibson.txt decoded.txt
test: test-c-example1 test-c-example2
--- origsrc/libb64-1.2.1/src/Makefile 2013-06-18 14:49:36.000000000 +0200
+++ src/libb64-1.2.1/src/Makefile 2022-01-08 19:39:12.010457300 +0100
@@ -1,4 +1,4 @@
-LIBRARIES = libb64.a
+LIBRARIES = cygb64.dll
# Build flags (uncomment one)
#############################
@@ -24,11 +24,9 @@ vpath %.h ../include/b64
all: $(TARGETS) #strip
-libb64.a: cencode.o cdecode.o
- $(AR) $(ARFLAGS) $@ $^
-
-strip:
- strip $(BINARIES) *.exe
+cygb64.dll: cencode.o cdecode.o
+ gcc -shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base \
+ -o $@ -Wl,--out-implib=libb64.dll.a $^
clean:
rm -f *.exe* *.o $(TARGETS) *.bak *~
next prev parent reply other threads:[~2022-01-08 19:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <99eff890-3d7f-7fa9-1f42-d8d611b92ded@gmail.com>
2022-01-08 17:41 ` Marco Atzeri
2022-01-08 19:15 ` Marco Atzeri [this message]
2022-01-08 19:24 ` Marco Atzeri
[not found] ` <a3f8e657-1e1d-c582-2a07-806c6c03be02@gmail.com>
2022-01-12 5:47 ` Marco Atzeri
2022-01-12 6:16 ` Brian Inglis
2022-01-12 22:59 ` [ITP] biosig [was: Re: newcomer issues when packaging biosig, stimfit, etc.] Alois Schlögl
2022-01-14 10:09 ` Marco Atzeri
2022-01-14 21:48 ` Alois Schlögl
2022-01-15 18:01 ` Marco Atzeri
2022-01-15 20:44 ` Achim Gratz
2022-01-17 21:44 ` Alois Schlögl
2022-01-18 5:32 ` Brian Inglis
2022-01-18 21:50 ` Alois Schlögl
2022-01-18 22:56 ` Brian Inglis
2022-01-19 3:51 ` Brian Inglis
2022-01-20 20:48 ` Alois Schlögl
2022-01-21 12:53 ` Jon Turney
2022-01-16 22:13 ` Alois Schlögl
2022-01-22 17:52 ` Marco Atzeri
2022-01-25 23:50 ` Alois Schlögl
2022-01-26 4:52 ` Marco Atzeri
2022-01-26 22:47 ` Marco Atzeri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44c5a1de-dbfe-625d-8ff8-049d8047277e@gmail.com \
--to=marco.atzeri@gmail.com \
--cc=alois.schloegl@gmail.com \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).