aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com>2010-07-13 12:45:18 +0200
committerKacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com>2010-07-13 12:45:18 +0200
commit286a932fe3dbf272aa8d6c60caac2740e2187e8c (patch)
treece438a827619bf20e5821825940646aa959d8d3f /sci-libs/omalloc
parentMacaulay2-1.3.1-r4: Various QA, static libfac/factory, (diff)
downloadsci-286a932fe3dbf272aa8d6c60caac2740e2187e8c.tar.gz
sci-286a932fe3dbf272aa8d6c60caac2740e2187e8c.tar.bz2
sci-286a932fe3dbf272aa8d6c60caac2740e2187e8c.zip
[sci-libs/omalloc]: Make shared libs, fix tests, fix install paths
Diffstat (limited to 'sci-libs/omalloc')
-rw-r--r--sci-libs/omalloc/ChangeLog5
-rw-r--r--sci-libs/omalloc/Manifest5
-rw-r--r--sci-libs/omalloc/files/omalloc-0.9.6-gentoo.diff133
-rw-r--r--sci-libs/omalloc/omalloc-0.9.6.ebuild22
4 files changed, 156 insertions, 9 deletions
diff --git a/sci-libs/omalloc/ChangeLog b/sci-libs/omalloc/ChangeLog
index 35cc3f8d5..66d538e57 100644
--- a/sci-libs/omalloc/ChangeLog
+++ b/sci-libs/omalloc/ChangeLog
@@ -2,6 +2,11 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 13 Jul 2010; Kacper Kowalik <xarthisius@gentoo.org> omalloc-0.9.6.ebuild,
+ +files/omalloc-0.9.6-gentoo.diff, files/parallel-build.patch,
+ metadata.xml:
+ Make shared libs, fix tests, fix install paths
+
*omalloc-0.9.6 (05 Jul 2010)
05 Jul 2010; Thomas Kahle <tom111@gmx.de> +omalloc-0.9.6.ebuild,
diff --git a/sci-libs/omalloc/Manifest b/sci-libs/omalloc/Manifest
index 3638af7aa..cbc818bd6 100644
--- a/sci-libs/omalloc/Manifest
+++ b/sci-libs/omalloc/Manifest
@@ -1,5 +1,6 @@
+AUX omalloc-0.9.6-gentoo.diff 4699 RMD160 1ccc067a58957b24b02f80cb0629892179a87205 SHA1 452e8a90d7bd34207e0bec260310244c98cfd57e SHA256 00b1e2b0de32f2cf99ffc443fa2e37f0e514b790bf248238698b4bbe5cc8a113
AUX parallel-build.patch 900 RMD160 1236c0c03b5209d782edf33bde30e10cefb71636 SHA1 f8aef60f60b890a63680d0276bce03b7070ba19d SHA256 f48cf0af887189c4a427e1b65d4b13962e11987b57d6b82eee06e85f85828f3e
DIST Singular-3-1-1-2.tar.gz 19397418 RMD160 205671f1ea2e2f22c025defc3d85c762362c7e3f SHA1 217af7a4e9b36b769a145bf81fb27c49d64333f6 SHA256 4e5929b324f952c69de1dedddbeca1c51a3733a0f63e026d3e7b61a7e469d5a7
-EBUILD omalloc-0.9.6.ebuild 944 RMD160 9c2a7cdd8a5bd2699853f0153558973e092bca9f SHA1 920ad2f3cc5a136ddbae8913fb8273810d5baa7e SHA256 67ab37b20855a082564357ba996747418aa5838b1ef31fe84d2ed925beff3ea7
-MISC ChangeLog 338 RMD160 d6d79c71e8600dc48e6b8313a15ab0c024cd3664 SHA1 0b926d5660b30c7565e7a96f85a68fcb542b87a6 SHA256 2c437a9acae1947ae11c9ecec0103c96a29f3382e67b6eb242fb99e618e438d5
+EBUILD omalloc-0.9.6.ebuild 953 RMD160 6724842392978fa39e77b95d2d510eb2d3365fd0 SHA1 8f866ee5c5273ccee84b31bebfb22eb40af3cfa6 SHA256 a150c6abc6c9839423016b1aceb766652b56ceaa3998b0922e5a2f4350b070a7
+MISC ChangeLog 544 RMD160 b9826ba26f551059127b5caf3917d5629a1a4d3c SHA1 f2e0c529445d02f600ee6b533cbca86f960af72c SHA256 fc2bfee3785cb54079f95aef9fad121707bedfacc04031e151294330aa03dfcb
MISC metadata.xml 330 RMD160 c8055f309c938468c7c0af9279c734fe40c7ac0d SHA1 2f4244a2e40645277e94692be694f5feac2c2c6c SHA256 802e41cbccd2d4b549736141e341590687775e678bf3ace3524027ff5beed136
diff --git a/sci-libs/omalloc/files/omalloc-0.9.6-gentoo.diff b/sci-libs/omalloc/files/omalloc-0.9.6-gentoo.diff
new file mode 100644
index 000000000..6491bf47e
--- /dev/null
+++ b/sci-libs/omalloc/files/omalloc-0.9.6-gentoo.diff
@@ -0,0 +1,133 @@
+--- Makefile.in
++++ Makefile.in
+@@ -8,7 +8,8 @@
+
+ SHELL = /bin/sh
+ VERSION = @VERSION@
+-
++LIBOMALLOC_SO = libomalloc.so
++LIBOMALLOC_SOVER= libomalloc.so.$(VERSION)
+ ##
+ ## various paths
+ ##
+@@ -83,9 +84,11 @@
+ omAllocSystem.h omFindExec.h omStats.h \
+ omBin.h omDefaultConfig.h omStructs.h \
+ omBinPage.h omInline.h omGetBackTrace.h \
+-omReturn.h omRet2Info.h omAllocFunc.h
++omReturn.h omRet2Info.h omAllocFunc.h \
++omTables.h
+
+ OBJS := $(CSOURCES:.c=.o) $(GSOURCES:.c=.o)
++OBJS_SHARED := $(CSOURCES:.c=.o_pic) $(GSOURCES:.c=.o_pic)
+ OBJS_NDEBUG := $(CSOURCES:.c=.o_ndebug) $(GSOURCES:.c=.o_ndebug)
+
+ SOURCES=${CSOURCES} omGetPageSize.h omMallocSystem.h gmalloc.c dlmalloc.h dlmalloc.c \
+@@ -103,6 +106,9 @@
+ %.o: %.c omConfig.h omlimits.h omTables.h omalloc.h omTables.inc
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $<
+
++%.o_pic: %.c omConfig.h omlimits.h mylimits.h omTables.h omalloc.h omTables.inc
++ ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -fPIC -c $< -o $@
++
+ %.o_ndebug: %.c omConfig.h omlimits.h mylimits.h omTables.h omalloc.h omTables.inc
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -DOM_NDEBUG -c $< -o $@
+
+@@ -113,9 +119,12 @@
+ %.aso: %.aso.o
+ ./$< > $@
+
+-all: libomalloc.a libomalloc_ndebug.a omalloc.h omalloc.o omalloc_debug.o
++all: lib omalloc.h omalloc.o omalloc_debug.o
++
++lib: libomalloc.a $(LIBOMALLOC_SOVER)
+
+-lib: libomalloc.a
++$(LIBOMALLOC_SOVER): $(OBJS_SHARED) Makefile omConfig.h omlimits.h mylimits.h
++ $(CC) -shared -Wl,-soname,$(LIBOMALLOC_SO).0 $(LDFLAGS) -o $@ $(OBJS_SHARED)
+
+ libomalloc.a: $(OBJS) Makefile omConfig.h omlimits.h mylimits.h
+ rm -f $@
+@@ -130,10 +139,10 @@
+ omalloc.h: $(HEADERS)
+ ./makeheader om_Alloc.h $@
+
+-omalloc.o: omalloc.c
++omalloc.o: omalloc.c omalloc.h
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -DOM_NDEBUG -c $< -o $@
+
+-omalloc_debug.o: omalloc_debug.c
++omalloc_debug.o: omalloc_debug.c omalloc.h
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${DEFS} -c $< -o $@
+
+ omTables.inc: omTables
+@@ -190,37 +199,32 @@
+ install-nolns: install
+
+ install-libsingular:
+- $(MKINSTALLDIRS) $(includedir)/singular
+- $(INSTALL) omalloc.h $(includedir)/singular
++ $(INSTALL) -D omalloc.h $(DESTDIR)$(includedir)/singular
+
+ install: all
+- $(MKINSTALLDIRS) $(libdir)
+- $(MKINSTALLDIRS) $(includedir)
+- $(INSTALL_DATA) libomalloc.a $(libdir)
+- $(RANLIB) $(libdir)/libomalloc.a
+- $(INSTALL_DATA) libomalloc_ndebug.a $(libdir)
+- $(RANLIB) $(libdir)/libomalloc_ndebug.a
+- $(INSTALL_DATA) omalloc.o $(libdir)
+- $(INSTALL_DATA) omalloc_debug.o $(libdir)
+- $(INSTALL_DATA) omalloc.h $(includedir)
+- $(INSTALL_DATA) omalloc.c $(includedir)
+- $(INSTALL_DATA) omlimits.h $(includedir)
+- $(INSTALL_DATA) mylimits.h $(includedir)
++ $(INSTALL_DATA) -D $(LIBOMALLOC_SOVER) $(DESTDIR)$(libdir)/$(LIBOMALLOC_SOVER)
++ $(LN_S) $(LIBOMALLOC_SOVER) $(DESTDIR)$(libdir)/$(LIBOMALLOC_SO)
++ $(LN_S) $(LIBOMALLOC_SOVER) $(DESTDIR)$(libdir)/$(LIBOMALLOC_SO).0
++ $(INSTALL_DATA) -D libomalloc.a $(DESTDIR)$(libdir)/libomalloc.a
++ $(RANLIB) $(DESTDIR)$(libdir)/libomalloc.a
++ $(INSTALL_DATA) omalloc.o $(DESTDIR)$(libdir)/omalloc.o
++ $(INSTALL_DATA) -D omalloc.h $(DESTDIR)$(includedir)/omalloc.h
++ $(INSTALL_DATA) omalloc.c $(DESTDIR)$(includedir)/omalloc.c
++ $(INSTALL_DATA) omlimits.h $(DESTDIR)$(includedir)/omlimits.h
++ $(INSTALL_DATA) mylimits.h $(DESTDIR)$(includedir)/mylimits.h
+
+ install_all: install libomalloc_p.a
+- $(INSTALL_DATA) libomalloc_p.a $(libdir)
+- $(RANLIB) $(libdir)/libomalloc_p.a
++ $(INSTALL_DATA) -D libomalloc_p.a $(DESTDIR)$(libdir)/libomalloc_p.a
++ $(RANLIB) $(DESTDIR)$(libdir)/libomalloc_p.a
+
+-install_min: libomalloc_ndebug.a omalloc.o
+- $(MKINSTALLDIRS) $(libdir)
+- $(MKINSTALLDIRS) $(includedir)
+- $(INSTALL_DATA) libomalloc_ndebug.a $(libdir)
+- $(RANLIB) $(libdir)/libomalloc_ndebug.a
+- $(INSTALL_DATA) omalloc.o $(libdir)
+- $(INSTALL_DATA) omalloc.h $(includedir)
+- $(INSTALL_DATA) omalloc.c $(includedir)
+- $(INSTALL_DATA) omlimits.h $(includedir)
+- $(INSTALL_DATA) mylimits.h $(includedir)
++install_min: omalloc.o
++ $(INSTALL_DATA) -D libomalloc.a $(DESTDIR)$(libdir)/libomalloc.a
++ $(RANLIB) $(DESTDIR)$(libdir)/libomalloc.a
++ $(INSTALL_DATA) omalloc.o $(DESTDIR)$(libdir)/omalloc.o
++ $(INSTALL_DATA) -D omalloc.h $(DESTDIR)$(includedir)/omalloc.h
++ $(INSTALL_DATA) omalloc.c $(DESTDIR)$(includedir)/omalloc.c
++ $(INSTALL_DATA) omlimits.h $(DESTDIR)$(includedir)/omlimits.h
++ $(INSTALL_DATA) mylimits.h $(DESTDIR)$(includedir)/mylimits.h
+
+ uninstall:
+ rm -f $(includedir)/omalloc.h $(includedir)/omalloc.c
+@@ -266,9 +270,8 @@
+ ## check
+ ##
+
+-check: omtTest omtTest_ndebug
++check: omtTest
+ ./omtTest
+- ./omtTest_ndebug
+
+ ##
+ ## Below here is stuff for developpers
diff --git a/sci-libs/omalloc/omalloc-0.9.6.ebuild b/sci-libs/omalloc/omalloc-0.9.6.ebuild
index a25d7c14d..b860d2c95 100644
--- a/sci-libs/omalloc/omalloc-0.9.6.ebuild
+++ b/sci-libs/omalloc/omalloc-0.9.6.ebuild
@@ -12,13 +12,13 @@ MY_PV_SHARE=${MY_PV}
DESCRIPTION="omalloc is the memory management of the Singular algebra system"
HOMEPAGE="http://www.singular.uni-kl.de/"
-SRC_COM="http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/3-1-1/3-1-1-2"
+SRC_COM="http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/3-1-1"
SRC_URI="${SRC_COM}/Singular-3-1-1-2.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
-IUSE=""
+IUSE="debug"
S=${WORKDIR}/Singular-3-1-1/omalloc
@@ -30,12 +30,20 @@ pkg_setup() {
}
src_prepare (){
- epatch "${FILESDIR}"/parallel-build.patch
+ epatch "${FILESDIR}"/${P}-gentoo.diff
+}
+
+src_configure() {
+ econf \
+ $(use_with debug)
+}
+
+src_test () {
+ if use debug; then
+ emake check || die
+ fi
}
src_install () {
- emake DESTDIR="${D}" install || die "install failed"
- # dolib.a *.a
- # insinto /usr/include
- # doins omalloc.h omalloc.c mylimits.h
+ emake DESTDIR="${D}" install || die
}