Hi.
I'm trying to make libusb support in pilot-link to work under OpenBSD.
But for this I need pilot-link with thread support (which may as well be
enabled regardless of libusb support).
So, one thing at a time, this diff adds thread to our pilot-link port
(with some Makefile cleaning).
I've been using this for weeks now without any problem.
ok?
--
Antoine
diff -ruN --exclude CVS /usr/ports/comms/pilot-link/Makefile pilot-link/Makefile
--- /usr/ports/comms/pilot-link/Makefile Sat Oct 28 13:19:20 2006
+++ pilot-link/Makefile Sun Dec 31 15:43:34 2006
@@ -4,10 +4,11 @@
COMMENT= "tools to connect your PalmOSĀ® compatible handheld"
DISTNAME= pilot-link-0.12.1
+PKGNAME= ${DISTNAME}p0
SHARED_LIBS += pisock 9.0 # .9.1
SHARED_LIBS += pisync 1.0 # .0.2
-CATEGORIES= comms
+CATEGORIES= comms palm
MASTER_SITES= http://downloads.pilot-link.org/ \
http://www.slackware.at/data/slackware-10.2/source/l/pilot-link/ \
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/distfiles/ \
@@ -25,7 +26,7 @@
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
-WANTLIB= c m readline termcap z
+WANTLIB= c m readline termcap z pthread
MODULES= converters/libiconv
LIB_DEPENDS= png.>=4::graphics/png \
@@ -36,7 +37,9 @@
CONFIGURE_STYLE= gnu
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include
-I${LOCALBASE}/include/libpng" \
- LDFLAGS="-L${LOCALBASE}/lib" \
+ LDFLAGS="-L${LOCALBASE}/lib -pthread" \
+ PTHREAD_CFLAGS="-pthread" \
+ PTHREAD_LIBS="-pthread" \
ac_cv_lib_png_main=yes
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--with-libiconv=${LOCALBASE} \
@@ -44,24 +47,25 @@
--with-perl=/usr/bin/perl \
--with-readline \
--enable-conduits \
+ --enable-threads \
--without-efence \
--without-java \
--without-python \
--without-tcl
pre-configure:
- @if pkg_info -e 'pilot-link-0.11.*'; then \
+ @if pkg_info -e 'pilot-link-*'; then \
echo 1>&2 "+-------------------"; \
echo 1>&2 "| Error: you must remove the existing pilot-link
installation"; \
echo 1>&2 "| before compiling this version. To fully remove
run"; \
echo 1>&2 "| these commands as user root"; \
echo 1>&2 "|"; \
echo 1>&2 "| pkg_delete pilot-link"; \
- echo 1>&2 "|"; \
echo 1>&2 "+-------------------"; \
exit 1; \
fi
- perl -pi -e "s,[EMAIL PROTECTED]@[EMAIL PROTECTED]@,${CFLAGS},g"
${WRKSRC}/bindings/Perl/Makefile.PL.in
+ perl -pi -e "s,!!CFLAGS!!,${CFLAGS},g"
${WRKSRC}/bindings/Perl/Makefile.PL.in
+ perl -pi -e "s,Libs: ,Libs: -pthread ,g" ${WRKSRC}/pilot-link-pp.pc.in
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pilot-link
diff -ruN --exclude CVS
/usr/ports/comms/pilot-link/patches/patch-bindings_Perl_Makefile_PL_in
pilot-link/patches/patch-bindings_Perl_Makefile_PL_in
--- /usr/ports/comms/pilot-link/patches/patch-bindings_Perl_Makefile_PL_in
Fri Oct 20 13:48:06 2006
+++ pilot-link/patches/patch-bindings_Perl_Makefile_PL_in Sun Dec 31
13:47:38 2006
@@ -10,5 +10,5 @@
'dynamic_lib'=> {'OTHERLDFLAGS' => $lib},
'depend' => {'Pilot.c' => 'const-c.inc const-xs.inc'},
'clean' => {'FILES' => 'const-c.inc const-xs.inc'},
-+ 'OPTIMIZE' => "@@CFLAGS@@",
++ 'OPTIMIZE' => "!!CFLAGS!!",
);