diff --git a/lang/chibi-scheme/Makefile b/lang/chibi-scheme/Makefile index b0356f4709f8..c04f11159319 100644 --- a/lang/chibi-scheme/Makefile +++ b/lang/chibi-scheme/Makefile @@ -3,12 +3,14 @@ PORTNAME= chibi-scheme PORTVERSION= 0.7.3 +PORTREVISION= 1 CATEGORIES= lang MAINTAINER= tobik@FreeBSD.org COMMENT= Minimal Scheme implementation for use as a C extension language LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYING USE_GITHUB= yes GH_ACCOUNT= ashinn @@ -16,9 +18,21 @@ GH_ACCOUNT= ashinn USES= gmake USE_LDCONFIG= yes -MAKE_ARGS+= MODDIR=${LOCALBASE}/lib/chibi \ - MANDIR=${LOCALBASE}/man/man1 \ - INSTALL_BIN="${INSTALL} -s" \ - PKGCONFDIR=${LOCALBASE}/libdata/pkgconfig +MAKE_ARGS= MODDIR=${PREFIX}/lib/chibi \ + MANDIR=${PREFIX}/man/man1 \ + LIBCHIBI_FLAGS='-Wl,-soname="libchibi-scheme.so.${PORTVERSION}"' + +ALL_TARGET= all libchibi-scheme.a +TEST_TARGET= test + +post-patch: + @${REINPLACE_CMD} -e 's@ -g -g3 -O3 @ @' \ + -e 's@$$(SOLIBDIR)/pkgconfig@${PREFIX}/libdata/pkgconfig@' \ + -e '/$$(SO)/ s@$$(INSTALL) -m0755 @$$(BSD_INSTALL_LIB) @' \ + -e '/tools/ s@$$(INSTALL) -m0755 @$$(BSD_INSTALL_SCRIPT) @' \ + -e 's@$$(INSTALL) -m0755 @$$(BSD_INSTALL_PROGRAM) @' \ + -e '/$$(MANDIR)/ s@$$(INSTALL) -m0644 @$$(BSD_INSTALL_MAN) @' \ + -e 's@$$(INSTALL) -m0644 @$$(BSD_INSTALL_DATA) @' \ + ${WRKSRC}/Makefile .include diff --git a/lang/chibi-scheme/files/patch-Makefile b/lang/chibi-scheme/files/patch-Makefile deleted file mode 100644 index 06837bb9975d..000000000000 --- a/lang/chibi-scheme/files/patch-Makefile +++ /dev/null @@ -1,92 +0,0 @@ ---- Makefile.orig 2015-05-10 13:47:12 UTC -+++ Makefile -@@ -72,15 +72,15 @@ endif - - ifeq ($(SEXP_USE_DL),0) - XLDFLAGS := $(LDFLAGS) $(RLDFLAGS) $(GCLDFLAGS) -lm --XCFLAGS := -Wall -DSEXP_USE_DL=0 -g -g3 -O3 $(CFLAGS) -+XCFLAGS := -Wall -DSEXP_USE_DL=0 $(CFLAGS) - else - XLDFLAGS := $(LDFLAGS) $(RLDFLAGS) $(GCLDFLAGS) $(LIBDL) -lm --XCFLAGS := -Wall -g -g3 -O3 $(CFLAGS) -+XCFLAGS := -Wall $(CFLAGS) - endif - - ######################################################################## - --all: chibi-scheme$(EXE) all-libs chibi-scheme.pc $(META_FILES) -+all: chibi-scheme$(EXE) all-libs chibi-scheme.pc $(META_FILES) libchibi-scheme.a - - include/chibi/install.h: Makefile - echo '#define sexp_so_extension "'$(SO)'"' > $@ -@@ -250,7 +250,7 @@ dist-clean: dist-clean-libs cleaner - - install: all - $(MKDIR) $(DESTDIR)$(BINDIR) -- $(INSTALL) -m0755 chibi-scheme$(EXE) $(DESTDIR)$(BINDIR)/ -+ $(INSTALL_BIN) -m0755 chibi-scheme$(EXE) $(DESTDIR)$(BINDIR)/ - $(INSTALL) -m0755 tools/chibi-ffi $(DESTDIR)$(BINDIR)/ - $(INSTALL) -m0755 tools/chibi-doc $(DESTDIR)$(BINDIR)/ - $(INSTALL) -m0755 tools/snow-chibi $(DESTDIR)$(BINDIR)/ -@@ -294,28 +294,28 @@ install: all - $(MKDIR) $(DESTDIR)$(BINMODDIR)/chibi/optimize/ - $(MKDIR) $(DESTDIR)$(BINMODDIR)/scheme/ - $(MKDIR) $(DESTDIR)$(BINMODDIR)/srfi/18 $(DESTDIR)$(BINMODDIR)/srfi/27 $(DESTDIR)$(BINMODDIR)/srfi/33 $(DESTDIR)$(BINMODDIR)/srfi/39 $(DESTDIR)$(BINMODDIR)/srfi/69 $(DESTDIR)$(BINMODDIR)/srfi/95 $(DESTDIR)$(BINMODDIR)/srfi/98 -- $(INSTALL) -m0755 $(CHIBI_COMPILED_LIBS) $(DESTDIR)$(BINMODDIR)/chibi/ -- $(INSTALL) -m0755 $(CHIBI_CRYPTO_COMPILED_LIBS) $(DESTDIR)$(BINMODDIR)/chibi/crypto/ -- $(INSTALL) -m0755 $(CHIBI_IO_COMPILED_LIBS) $(DESTDIR)$(BINMODDIR)/chibi/io/ -- $(INSTALL) -m0755 $(CHIBI_OPT_COMPILED_LIBS) $(DESTDIR)$(BINMODDIR)/chibi/optimize/ -- $(INSTALL) -m0755 lib/scheme/time$(SO) $(DESTDIR)$(BINMODDIR)/scheme/ -- $(INSTALL) -m0755 lib/srfi/18/threads$(SO) $(DESTDIR)$(BINMODDIR)/srfi/18 -- $(INSTALL) -m0755 lib/srfi/27/rand$(SO) $(DESTDIR)$(BINMODDIR)/srfi/27 -- $(INSTALL) -m0755 lib/srfi/33/bit$(SO) $(DESTDIR)$(BINMODDIR)/srfi/33 -- $(INSTALL) -m0755 lib/srfi/39/param$(SO) $(DESTDIR)$(BINMODDIR)/srfi/39 -- $(INSTALL) -m0755 lib/srfi/69/hash$(SO) $(DESTDIR)$(BINMODDIR)/srfi/69 -- $(INSTALL) -m0755 lib/srfi/95/qsort$(SO) $(DESTDIR)$(BINMODDIR)/srfi/95 -- $(INSTALL) -m0755 lib/srfi/98/env$(SO) $(DESTDIR)$(BINMODDIR)/srfi/98 -+ $(INSTALL_BIN) -m0755 $(CHIBI_COMPILED_LIBS) $(DESTDIR)$(BINMODDIR)/chibi/ -+ $(INSTALL_BIN) -m0755 $(CHIBI_CRYPTO_COMPILED_LIBS) $(DESTDIR)$(BINMODDIR)/chibi/crypto/ -+ $(INSTALL_BIN) -m0755 $(CHIBI_IO_COMPILED_LIBS) $(DESTDIR)$(BINMODDIR)/chibi/io/ -+ $(INSTALL_BIN) -m0755 $(CHIBI_OPT_COMPILED_LIBS) $(DESTDIR)$(BINMODDIR)/chibi/optimize/ -+ $(INSTALL_BIN) -m0755 lib/scheme/time$(SO) $(DESTDIR)$(BINMODDIR)/scheme/ -+ $(INSTALL_BIN) -m0755 lib/srfi/18/threads$(SO) $(DESTDIR)$(BINMODDIR)/srfi/18 -+ $(INSTALL_BIN) -m0755 lib/srfi/27/rand$(SO) $(DESTDIR)$(BINMODDIR)/srfi/27 -+ $(INSTALL_BIN) -m0755 lib/srfi/33/bit$(SO) $(DESTDIR)$(BINMODDIR)/srfi/33 -+ $(INSTALL_BIN) -m0755 lib/srfi/39/param$(SO) $(DESTDIR)$(BINMODDIR)/srfi/39 -+ $(INSTALL_BIN) -m0755 lib/srfi/69/hash$(SO) $(DESTDIR)$(BINMODDIR)/srfi/69 -+ $(INSTALL_BIN) -m0755 lib/srfi/95/qsort$(SO) $(DESTDIR)$(BINMODDIR)/srfi/95 -+ $(INSTALL_BIN) -m0755 lib/srfi/98/env$(SO) $(DESTDIR)$(BINMODDIR)/srfi/98 - $(MKDIR) $(DESTDIR)$(INCDIR) - $(INSTALL) -m0644 $(INCLUDES) $(DESTDIR)$(INCDIR)/ - $(MKDIR) $(DESTDIR)$(LIBDIR) - $(MKDIR) $(DESTDIR)$(SOLIBDIR) -- $(INSTALL) -m0755 libchibi-scheme$(SO_VERSIONED_SUFFIX) $(DESTDIR)$(SOLIBDIR)/ -+ $(INSTALL_BIN) -m0755 libchibi-scheme$(SO_VERSIONED_SUFFIX) $(DESTDIR)$(SOLIBDIR)/ - $(LN) -s -f libchibi-scheme$(SO_VERSIONED_SUFFIX) $(DESTDIR)$(SOLIBDIR)/libchibi-scheme$(SO_MAJOR_VERSIONED_SUFFIX) - $(LN) -s -f libchibi-scheme$(SO_VERSIONED_SUFFIX) $(DESTDIR)$(SOLIBDIR)/libchibi-scheme$(SO) - -$(INSTALL) -m0644 libchibi-scheme.a $(DESTDIR)$(SOLIBDIR)/ -- $(MKDIR) $(DESTDIR)$(SOLIBDIR)/pkgconfig -- $(INSTALL) -m0644 chibi-scheme.pc $(DESTDIR)$(SOLIBDIR)/pkgconfig/ -+ $(MKDIR) $(DESTDIR)$(PKGCONFDIR) -+ $(INSTALL) -m0644 chibi-scheme.pc $(DESTDIR)$(PKGCONFDIR) - $(MKDIR) $(DESTDIR)$(MANDIR) - $(INSTALL) -m0644 doc/chibi-scheme.1 $(DESTDIR)$(MANDIR)/ - $(INSTALL) -m0644 doc/chibi-ffi.1 $(DESTDIR)$(MANDIR)/ -@@ -332,7 +332,7 @@ uninstall: - -$(RM) $(DESTDIR)$(SOLIBDIR)/libchibi-scheme$(SO_VERSIONED_SUFFIX) - -$(RM) $(DESTDIR)$(SOLIBDIR)/libchibi-scheme$(SO_MAJOR_VERSIONED_SUFFIX) - -$(RM) $(DESTDIR)$(LIBDIR)/libchibi-scheme$(SO).a -- -$(RM) $(DESTDIR)$(SOLIBDIR)/pkgconfig/chibi-scheme.pc -+ -$(RM) $(DESTDIR)$(PKGCONFDIR)/chibi-scheme.pc - -$(CD) $(DESTDIR)$(INCDIR) && $(RM) $(INCLUDES) - -$(RM) $(DESTDIR)$(MODDIR)/srfi/99/records/*.{sld,scm} - -$(RM) $(DESTDIR)$(MODDIR)/.*.meta -@@ -371,7 +371,7 @@ uninstall: - -$(RMDIR) $(DESTDIR)$(MODDIR)/srfi $(DESTDIR)$(BINMODDIR)/srfi - -$(RMDIR) $(DESTDIR)$(MODDIR) $(DESTDIR)$(BINMODDIR) - -$(RM) $(DESTDIR)$(MANDIR)/chibi-scheme.1 $(DESTDIR)$(MANDIR)/chibi-ffi.1 $(DESTDIR)$(MANDIR)/chibi-doc.1 -- -$(RM) $(DESTDIR)$(SOLIBDIR)/pkgconfig/chibi-scheme.pc -+ -$(RM) $(DESTDIR)$(PKGCONFDIR)/chibi-scheme.pc - - dist: dist-clean - $(RM) chibi-scheme-$(VERSION).tgz diff --git a/lang/chibi-scheme/files/patch-Makefile.libs b/lang/chibi-scheme/files/patch-Makefile.libs deleted file mode 100644 index daa70eb55e6f..000000000000 --- a/lang/chibi-scheme/files/patch-Makefile.libs +++ /dev/null @@ -1,18 +0,0 @@ ---- Makefile.libs.orig 2015-05-10 13:47:12 UTC -+++ Makefile.libs -@@ -16,6 +16,7 @@ LS ?= ls - CP ?= cp - LN ?= ln - INSTALL ?= install -+INSTALL_BIN ?= $(INSTALL) - MKDIR ?= $(INSTALL) -d - RMDIR ?= rmdir - TAR ?= tar -@@ -31,6 +32,7 @@ SOLIBDIR ?= $(PREFIX)/lib - INCDIR ?= $(PREFIX)/include/chibi - MODDIR ?= $(PREFIX)/share/chibi - BINMODDIR ?= $(PREFIX)/lib/chibi -+PKGCONFDIR ?= $(PREFIX)/lib/pkgconfig - MANDIR ?= $(PREFIX)/share/man/man1 - - DESTDIR ?=