pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/xxhash



Module Name:    pkgsrc
Committed By:   nia
Date:           Sat Mar 16 10:12:43 UTC 2024

Modified Files:
        pkgsrc/devel/xxhash: Makefile PLIST
Added Files:
        pkgsrc/devel/xxhash/files: Makefile

Log Message:
xxhash: Libtoolize for compatibility with more linkers.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/xxhash/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/xxhash/PLIST
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/xxhash/files/Makefile

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

Modified files:

Index: pkgsrc/devel/xxhash/Makefile
diff -u pkgsrc/devel/xxhash/Makefile:1.7 pkgsrc/devel/xxhash/Makefile:1.8
--- pkgsrc/devel/xxhash/Makefile:1.7    Sun Jul 30 02:26:16 2023
+++ pkgsrc/devel/xxhash/Makefile        Sat Mar 16 10:12:43 2024
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2023/07/30 02:26:16 wiz Exp $
+# $NetBSD: Makefile,v 1.8 2024/03/16 10:12:43 nia Exp $
 
 DISTNAME=      xxhash-0.8.2
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=Cyan4973/}
 GITHUB_PROJECT=        xxHash
@@ -11,11 +12,14 @@ HOMEPAGE=   https://github.com/Cyan4973/xx
 COMMENT=       Extremely fast non-cryptographic hash algorithm
 LICENSE=       2-clause-bsd
 
-USE_TOOLS+=            gmake
-PKGCONFIG_OVERRIDE+=   libxxhash.pc.in
-MAKE_ENV+=             INSTALL=${TOOLS_PLATFORM.install:Q}
-MAKE_ENV+=             MANDIR=${PREFIX}/${PKGMANDIR}/man1
-MAKE_ENV+=             PKGCONFIGDIR=${PREFIX}/lib/pkgconfig
-TEST_TARGET=           check
+USE_LIBTOOL=   yes
+MAKE_ENV+=     MANDIR=${PKGMANDIR}
+MAKE_ENV+=     PKGVERSION_NOREV=${PKGVERSION_NOREV}
+
+pre-configure:
+       ${CP} ${FILESDIR}/Makefile ${WRKSRC}/Makefile
+
+test:
+       cd ${WRKSRC} && ./xxhsum -b
 
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/devel/xxhash/PLIST
diff -u pkgsrc/devel/xxhash/PLIST:1.3 pkgsrc/devel/xxhash/PLIST:1.4
--- pkgsrc/devel/xxhash/PLIST:1.3       Mon Jun 29 13:19:48 2020
+++ pkgsrc/devel/xxhash/PLIST   Sat Mar 16 10:12:43 2024
@@ -1,14 +1,11 @@
-@comment $NetBSD: PLIST,v 1.3 2020/06/29 13:19:48 adam Exp $
+@comment $NetBSD: PLIST,v 1.4 2024/03/16 10:12:43 nia Exp $
 bin/xxh128sum
 bin/xxh32sum
 bin/xxh64sum
 bin/xxhsum
 include/xxh3.h
 include/xxhash.h
-lib/libxxhash.a
-lib/libxxhash.so
-lib/libxxhash.so.${PKGVERSION}
-lib/libxxhash.so.0
+lib/libxxhash.la
 lib/pkgconfig/libxxhash.pc
 man/man1/xxh128sum.1
 man/man1/xxh32sum.1

Added files:

Index: pkgsrc/devel/xxhash/files/Makefile
diff -u /dev/null pkgsrc/devel/xxhash/files/Makefile:1.1
--- /dev/null   Sat Mar 16 10:12:43 2024
+++ pkgsrc/devel/xxhash/files/Makefile  Sat Mar 16 10:12:43 2024
@@ -0,0 +1,75 @@
+# $NetBSD: Makefile,v 1.1 2024/03/16 10:12:43 nia Exp $
+
+LIBTOOL?=              libtool
+MANDIR?=               man
+
+MAJOR!=                        printf '%s\n' "$(PKGVERSION_NOREV)" | cut -d. -f1
+MINOR!=                        printf '%s\n' "$(PKGVERSION_NOREV)" | cut -d. -f2
+PATCH!=                        printf '%s\n' "$(PKGVERSION_NOREV)" | cut -d. -f3
+
+XXHSUM_SRC_DIR=                cli
+
+XXHSUM_SPLIT_OBJS=     $(XXHSUM_SRC_DIR)/xxhsum.lo \
+                       $(XXHSUM_SRC_DIR)/xsum_os_specific.lo \
+                       $(XXHSUM_SRC_DIR)/xsum_output.lo \
+                       $(XXHSUM_SRC_DIR)/xsum_sanity_check.lo \
+                       $(XXHSUM_SRC_DIR)/xsum_bench.lo
+
+.SUFFIXES: .lo
+
+.c.lo:
+       $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@
+
+.c.o:
+       $(CC) $(CFLAGS) -c $< -o $@
+
+all: libxxhash.la libxxhash.pc xxh32sum xxh64sum xxh128sum \
+       xxh32sum.1 xxh64sum.1 xxh128sum.1
+
+xxh32sum xxh64sum xxh128sum: xxhsum
+       ln -sf xxhsum $@
+
+xxh32sum.1 xxh64sum.1 xxh128sum.1: $(XXHSUM_SRC_DIR)/xxhsum.1
+       ln -sf $(XXHSUM_SRC_DIR)/xxhsum.1 $@
+
+libxxhash.la: xxhash.lo
+       $(LIBTOOL) --quiet --tag=CC --mode=link \
+               $(CC) $(LDFLAGS) -rpath $(PREFIX)/lib -version-info 0:0 -o $@ xxhash.lo
+
+xxhsum: xxhash.lo $(XXHSUM_SPLIT_OBJS)
+       $(LIBTOOL) --quiet --tag=CC --mode=link \
+               $(CC) $(CFLAGS) $(LDFLAGS) -o $@ xxhash.lo $(XXHSUM_SPLIT_OBJS)
+
+libxxhash.pc: libxxhash.pc.in
+       sed     -e "s,@PREFIX@,$(PREFIX),g" \
+               -e "s,@EXECPREFIX@,$(PREFIX)/bin,g" \
+               -e "s,@INCLUDEDIR@,$(PREFIX)/include,g" \
+               -e "s,@LIBDIR@,$(PREFIX)/lib,g" \
+               libxxhash.pc.in > libxxhash.pc
+
+install:
+       mkdir -p $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+       $(BSD_INSTALL_MAN) $(XXHSUM_SRC_DIR)/xxhsum.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+       $(BSD_INSTALL_MAN) xxh32sum.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+       $(BSD_INSTALL_MAN) xxh64sum.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+       $(BSD_INSTALL_MAN) xxh128sum.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+       mkdir -p $(DESTDIR)$(PREFIX)/lib/pkgconfig
+       $(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) libxxhash.pc \
+               $(DESTDIR)$(PREFIX)/lib/pkgconfig
+       $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) libxxhash.la \
+               $(DESTDIR)$(PREFIX)/lib
+       mkdir -p $(DESTDIR)$(PREFIX)/bin
+       $(LIBTOOL) --mode=install \
+               $(BSD_INSTALL_PROGRAM) xxhsum $(DESTDIR)$(PREFIX)/bin
+       $(BSD_INSTALL_PROGRAM) xxh32sum $(DESTDIR)$(PREFIX)/bin
+       $(BSD_INSTALL_PROGRAM) xxh64sum $(DESTDIR)$(PREFIX)/bin
+       $(BSD_INSTALL_PROGRAM) xxh128sum $(DESTDIR)$(PREFIX)/bin
+       mkdir -p $(DESTDIR)$(PREFIX)/include
+       $(BSD_INSTALL_DATA) xxhash.h $(DESTDIR)$(PREFIX)/include
+       $(BSD_INSTALL_DATA) xxh3.h $(DESTDIR)$(PREFIX)/include
+
+clean:
+       rm -f $(XXHSUM_SPLIT_OBJS)
+       rm -f xxhash.lo xxhash.o
+       rm -f libxxhash.lo libxxhash.o
+       rm -f xxhsum xxh32sum xxh64sum xxh128sum



Home | Main Index | Thread Index | Old Index