pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/syncdir



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Mon Nov 12 17:54:40 UTC 2018

Modified Files:
        pkgsrc/devel/syncdir: Makefile distinfo
Added Files:
        pkgsrc/devel/syncdir/patches: patch-Makefile patch-testsync.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/devel/syncdir/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/syncdir/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/syncdir/patches/patch-Makefile \
    pkgsrc/devel/syncdir/patches/patch-testsync.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/syncdir/Makefile
diff -u pkgsrc/devel/syncdir/Makefile:1.11 pkgsrc/devel/syncdir/Makefile:1.12
--- pkgsrc/devel/syncdir/Makefile:1.11  Thu Jul 20 02:07:27 2017
+++ pkgsrc/devel/syncdir/Makefile       Mon Nov 12 17:54:40 2018
@@ -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 @@ MASTER_SITES=           ${HOMEPAGE}
 
 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_FILES.fsync=   syncdir.c
 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"

Index: pkgsrc/devel/syncdir/distinfo
diff -u pkgsrc/devel/syncdir/distinfo:1.5 pkgsrc/devel/syncdir/distinfo:1.6
--- pkgsrc/devel/syncdir/distinfo:1.5   Thu Jul 20 03:21:16 2017
+++ pkgsrc/devel/syncdir/distinfo       Mon Nov 12 17:54:40 2018
@@ -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

Added files:

Index: pkgsrc/devel/syncdir/patches/patch-Makefile
diff -u /dev/null pkgsrc/devel/syncdir/patches/patch-Makefile:1.1
--- /dev/null   Mon Nov 12 17:54:40 2018
+++ pkgsrc/devel/syncdir/patches/patch-Makefile Mon Nov 12 17:54:40 2018
@@ -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
Index: pkgsrc/devel/syncdir/patches/patch-testsync.c
diff -u /dev/null pkgsrc/devel/syncdir/patches/patch-testsync.c:1.1
--- /dev/null   Mon Nov 12 17:54:40 2018
+++ pkgsrc/devel/syncdir/patches/patch-testsync.c       Mon Nov 12 17:54:40 2018
@@ -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