- Add soname to libchibi-scheme.so

- Fix installed file modes
- Enable tests
- Add LICENSE_FILE

Approved by:	mat (mentor)
Differential Revision:	https://reviews.freebsd.org/D11353
This commit is contained in:
Tobias Kortkamp 2017-06-27 08:29:16 +00:00
parent a9321e1c51
commit 937998a241
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=444446
3 changed files with 18 additions and 114 deletions

View File

@ -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 <bsd.port.mk>

View File

@ -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

View File

@ -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 ?=