pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/syncdir Refactor libtoolization: integrate it in...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/710917c43059
branches:  trunk
changeset: 314968:710917c43059
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Mon Nov 12 17:54:40 2018 +0000

description:
Refactor libtoolization: integrate it into the upstream Makefile.
No visible change on NetBSD, CentOS 6, OS X 10.14.

diffstat:

 devel/syncdir/Makefile                 |  14 +------
 devel/syncdir/distinfo                 |   4 +-
 devel/syncdir/patches/patch-Makefile   |  67 ++++++++++++++++++++++++++++++++++
 devel/syncdir/patches/patch-testsync.c |  15 +++++++
 4 files changed, 87 insertions(+), 13 deletions(-)

diffs (137 lines):

diff -r ae3006b011d0 -r 710917c43059 devel/syncdir/Makefile
--- a/devel/syncdir/Makefile    Mon Nov 12 17:13:47 2018 +0000
+++ b/devel/syncdir/Makefile    Mon Nov 12 17:54:40 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2017/07/20 02:07:27 schmonz Exp $
+# $NetBSD: Makefile,v 1.12 2018/11/12 17:54:40 schmonz Exp $
 #
 
 DISTNAME=              syncdir-1.0
@@ -8,7 +8,7 @@
 
 MAINTAINER=            schmonz%NetBSD.org@localhost
 HOMEPAGE=              http://untroubled.org/syncdir/
-COMMENT=               Implementation of open, link, rename, and unlink
+COMMENT=               Synchronous open, link, rename, and unlink
 LICENSE=               gnu-gpl-v2
 
 USE_LIBTOOL=           yes
@@ -24,14 +24,4 @@
 SUBST_SED.fsync=       -e 's|syscall(SYS_fsync, FD)|fsync(FD)|'
 .endif
 
-do-build:
-       cd ${WRKSRC} && ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -c syncdir.c
-       cd ${WRKSRC} && ${LIBTOOL} --mode=link ${CC} ${LDFLAGS}         \
-               -o libsyncdir.la syncdir.lo                             \
-               -version-info 1:0:0 -rpath ${PREFIX}/lib
-
-do-install:
-       cd ${WRKSRC} && ${LIBTOOL} --mode=install ${INSTALL_LIB}        \
-               -c libsyncdir.la ${DESTDIR}${PREFIX}/lib/libsyncdir.la
-
 .include "../../mk/bsd.pkg.mk"
diff -r ae3006b011d0 -r 710917c43059 devel/syncdir/distinfo
--- a/devel/syncdir/distinfo    Mon Nov 12 17:13:47 2018 +0000
+++ b/devel/syncdir/distinfo    Mon Nov 12 17:54:40 2018 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.5 2017/07/20 03:21:16 schmonz Exp $
+$NetBSD: distinfo,v 1.6 2018/11/12 17:54:40 schmonz Exp $
 
 SHA1 (syncdir-1.0.tar.gz) = fdc3e282acd4af15e9bffb343ee825d69dde162e
 RMD160 (syncdir-1.0.tar.gz) = b032a8481529c54b4ac149fdf98ad888e0a392f0
 SHA512 (syncdir-1.0.tar.gz) = 0b5262e23e43f34be7bc31ed6baf7624a115a509e459504651b184a0856c7918671db4be1b8e14552f275c49c5c6bbc00d786c57f1d96548a491048674f58317
 Size (syncdir-1.0.tar.gz) = 8878 bytes
+SHA1 (patch-Makefile) = ed9063d6359f4dc8cf905cb85b14e830a65832d9
 SHA1 (patch-syncdir.c) = eb289d0fd2fa29adb941899603835a14df4bc4f0
+SHA1 (patch-testsync.c) = 03f536c6ba1af64c9dca6735ce8cc58a1270bc3f
diff -r ae3006b011d0 -r 710917c43059 devel/syncdir/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/syncdir/patches/patch-Makefile      Mon Nov 12 17:54:40 2018 +0000
@@ -0,0 +1,67 @@
+$NetBSD: patch-Makefile,v 1.1 2018/11/12 17:54:40 schmonz Exp $
+
+Libtoolize for portability.
+
+--- Makefile.orig      1998-07-13 19:33:23.000000000 +0000
++++ Makefile
+@@ -1,34 +1,33 @@
+ VERSION       = 1.0
+ 
+-CFLAGS        = -O2 -Wall -g
+-CC    = gcc
+-LDFLAGS       =
+-LD    = $(CC)
+-prefix        = /usr
++CFLAGS        ?= -O2 -Wall -g
++CC    ?= gcc
++LDFLAGS       ?=
++LD    ?= $(CC)
++prefix        = $(PREFIX)
+ libdir        = $(prefix)/lib
+ 
+-OBJS  = syncdir.o
+ LOBJS = syncdir.lo
+ 
+-all:  libsyncdir.so libsyncdir.a
++LIBTOOL       = libtool --tag=CC
+ 
+-testsync: testsync.o libsyncdir.a
+-      $(LD) $(LDFLAGS) -o $@ $< libsyncdir.a
++all:  libsyncdir.la
+ 
+-libsyncdir.so:        $(LOBJS)
+-      $(LD) $(LDFLAGS) -shared -Wl,-soname,libsyncdir.so \
+-              -o libsyncdir.so $(LOBJS)
++.SUFFIXES: .lo
++.c.lo:
++      $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
+ 
+-syncdir.lo:   syncdir.c
+-      $(CC) $(CFLAGS) -fPIC -DPIC -o $@ -c $<
+-syncdir.o:    syncdir.c
++testsync: testsync.lo libsyncdir.la
++      $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $< libsyncdir.la
+ 
+-libsyncdir.a: $(OBJS)
+-      ar r libsyncdir.a $(OBJS)
++libsyncdir.la: libtool-version-info $(LOBJS)
++      $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(LOBJS) -version-info `cat libtool-version-info` -rpath $(libdir)
++
++libtool-version-info:
++      echo $(VERSION) | awk -F. '{ printf "%d:%d:0", $$1, $$2 }' > $@
+ 
+ install:      all
+-      install -m 755 libsyncdir.so $(libdir)
+-      install -m 644 libsyncdir.a $(libdir)
++      $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) libsyncdir.la $(DESTDIR)$(libdir)
+ 
+ TARGET        = syncdir-$(VERSION)
+ FILES = Makefile COPYING syncdir.c syncdir.spec testsync.c
+@@ -39,5 +38,5 @@ distrib:
+       $(RM) -r $(TARGET)
+ 
+ clean:
+-      $(RM) core *.o *.lo *.so *.a testsync $(TARGET).tar.gz
+-
++      $(RM) libtool-version-info core *.o *.lo *.la *.so *.a testsync $(TARGET).tar.gz
++      $(RM) -r .libs
diff -r ae3006b011d0 -r 710917c43059 devel/syncdir/patches/patch-testsync.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/syncdir/patches/patch-testsync.c    Mon Nov 12 17:54:40 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-testsync.c,v 1.1 2018/11/12 17:54:40 schmonz Exp $
+
+Libtoolize.
+
+--- testsync.c.orig    1998-07-13 19:43:05.000000000 +0000
++++ testsync.c
+@@ -2,7 +2,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ 
+-inline void msg(const char* m)
++void msg(const char* m)
+ {
+   write(1, m, strlen(m));
+ }



Home | Main Index | Thread Index | Old Index