SHARED_LIBS

tested and ok sturm@
This commit is contained in:
steven 2005-12-24 20:05:27 +00:00
parent a2f64ef4b3
commit 4cdf618554
8 changed files with 63 additions and 50 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.10 2005/11/20 17:44:20 naddy Exp $
# $OpenBSD: Makefile,v 1.11 2005/12/24 20:05:27 steven Exp $
NOT_FOR_ARCHS= vax
@ -8,6 +8,10 @@ VERSION= 2.1.72
DISTNAME= octave-${VERSION}
CATEGORIES= math
SHARED_LIBS= cruft 2.0 \
octave 2.0 \
octinterp 2.0
HOMEPAGE= http://www.octave.org/
MAINTAINER= Steven Mestdagh <steven.mestdagh@esat.kuleuven.be>
@ -43,13 +47,14 @@ CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--without-hdf5
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
MAKE_ENV= SHLIB_VER=${SHLIB_VER}
MAKE_ENV= LIBcruft_VERSION=${LIBcruft_VERSION} \
LIBoctave_VERSION=${LIBoctave_VERSION} \
LIBoctinterp_VERSION=${LIBoctinterp_VERSION}
# need shared library version for machines which support shared libraries.
SHLIB_VER= 2.0
# needed to build on amd64
GCC_ARCH= ${MACHINE_ARCH}-unknown-openbsd${OPSYS_VER}
GNU_ARCH= ${GCC_ARCH:S/amd64/x86_64/}
SUBST_VARS= GNU_ARCH VERSION SHLIB_VER
SUBST_VARS= GNU_ARCH VERSION
# need to use fpic version of libgcc.a
post-configure:

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-Makeconf_in,v 1.1 2005/11/02 18:20:58 alek Exp $
--- Makeconf.in.orig Sun Sep 25 11:32:52 2005
+++ Makeconf.in Sun Sep 25 11:32:06 2005
@@ -26,6 +26,7 @@ xfiles := $(TOPDIR)/src/version.h $(srcd
version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file))))
version := $(shell $(getversion) $(version_file))
apiversion := $(shell $(getapiversion) $(version_file))
+libversion := $(SHLIB_VER)
#### Start of system configuration section. ####

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-configure_in,v 1.2 2005/11/20 17:44:20 naddy Exp $
$OpenBSD: patch-configure_in,v 1.3 2005/12/24 20:05:27 steven Exp $
--- configure.in.orig Fri Nov 11 20:46:55 2005
+++ configure.in Sun Nov 20 16:53:15 2005
@@ -57,7 +57,7 @@ OCTAVE_SET_DEFAULT(localapifcnfiledir,
@ -19,17 +19,6 @@ $OpenBSD: patch-configure_in,v 1.2 2005/11/20 17:44:20 naddy Exp $
if test "$have_fftw3_header" = yes; then
AC_CHECK_LIB(fftw3, fftw_plan_dft_1d, [FFTW_LIBS="-lfftw3"; with_fftw3=yes])
fi
@@ -662,8 +662,8 @@ FPICFLAG=-fPIC
SHLEXT=so
SHLLIB='$(SHLEXT)'
SHLBIN=
-SHLEXT_VER='$(SHLEXT).$(version)'
-SHLLIB_VER='$(SHLLIB).$(version)'
+SHLEXT_VER='$(SHLEXT).$(libversion)'
+SHLLIB_VER='$(SHLLIB).$(libversion)'
SHLBIN_VER='$(SHLBIN).$(version)'
SHLLINKEXT=
SH_LD='$(CXX)'
@@ -678,9 +678,13 @@ TEMPLATE_AR='$(AR)'
TEMPLATE_ARFLAGS="$ARFLAGS"
library_path_var=LD_LIBRARY_PATH

View File

@ -1,7 +1,17 @@
$OpenBSD: patch-libcruft_Makefile_in,v 1.3 2005/11/02 18:20:58 alek Exp $
--- libcruft/Makefile.in.orig Fri Mar 4 17:13:56 2005
+++ libcruft/Makefile.in Mon Sep 26 07:43:35 2005
@@ -101,12 +101,8 @@ libcruft.$(LIBEXT): $(CRUFT_OBJ)
$OpenBSD: patch-libcruft_Makefile_in,v 1.4 2005/12/24 20:05:27 steven Exp $
--- libcruft/Makefile.in.orig Fri Nov 11 20:47:15 2005
+++ libcruft/Makefile.in Sat Dec 24 12:28:55 2005
@@ -78,6 +78,9 @@ ifeq ($(SHARED_LIBS), true)
endif
endif
+SHLLIB_VER=$(SHLEXT).$(LIBcruft_VERSION)
+SHLEXT_VER=$(SHLLIB_VER)
+
ifeq ($(SHARED_LIBS), true)
ifeq ($(STATIC_LIBS), true)
LIBRARIES = libcruft.$(LIBEXT) libcruft.$(SHLEXT_VER)
@@ -101,12 +104,8 @@ libcruft.$(LIBEXT): $(CRUFT_OBJ)
$(AR) $(ARFLAGS) $@ $^
$(RANLIB) $@
@ -15,7 +25,7 @@ $OpenBSD: patch-libcruft_Makefile_in,v 1.3 2005/11/02 18:20:58 alek Exp $
$(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(LINK_DEPS)
$(CRUFT_OBJ):
@@ -131,9 +127,7 @@ install::
@@ -131,9 +130,7 @@ install::
if $(SHARED_LIBS); then \
rm -f $(DESTDIR)$(octlibdir)/libcruft.$(SHLLIB_VER); \
$(INSTALL) \

View File

@ -1,7 +1,17 @@
$OpenBSD: patch-liboctave_Makefile_in,v 1.2 2005/11/02 18:20:58 alek Exp $
--- liboctave/Makefile.in.orig Wed May 18 14:20:25 2005
+++ liboctave/Makefile.in Mon Sep 26 07:42:42 2005
@@ -211,12 +211,8 @@ liboctave.$(LIBEXT): $(LIBOCTAVE_OBJECTS
$OpenBSD: patch-liboctave_Makefile_in,v 1.3 2005/12/24 20:05:27 steven Exp $
--- liboctave/Makefile.in.orig Fri Nov 11 20:47:31 2005
+++ liboctave/Makefile.in Sat Dec 24 13:08:00 2005
@@ -185,6 +185,9 @@ pic:
stamp-prereq: $(OPTS_INC) $(VX_OP_INC) $(VX_OP_SRC) $(MX_OP_INC) $(MX_OP_SRC) mx-ops.h
touch stamp-prereq
+SHLLIB_VER=$(SHLEXT).$(LIBoctave_VERSION)
+SHLEXT_VER=$(SHLLIB_VER)
+
ifeq ($(SHARED_LIBS), true)
ifeq ($(STATIC_LIBS), true)
libraries: \
@@ -211,12 +214,8 @@ liboctave.$(LIBEXT): $(LIBOCTAVE_OBJECTS
$(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $(LIBOCTAVE_OBJECTS)
$(RANLIB) $@
@ -15,7 +25,7 @@ $OpenBSD: patch-liboctave_Makefile_in,v 1.2 2005/11/02 18:20:58 alek Exp $
$(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ \
$(LIBOCTAVE_PICOBJ) $(LINK_DEPS)
@@ -243,9 +239,7 @@ install-lib:
@@ -243,9 +242,7 @@ install-lib:
if $(SHARED_LIBS); then \
rm -f $(DESTDIR)$(octlibdir)/liboctave.$(SHLLIB_VER); \
$(INSTALL) \

View File

@ -1,7 +1,17 @@
$OpenBSD: patch-src_Makefile_in,v 1.2 2005/11/02 18:20:58 alek Exp $
--- src/Makefile.in.orig Wed May 18 14:20:54 2005
+++ src/Makefile.in Wed Nov 2 10:32:55 2005
@@ -270,12 +270,8 @@ liboctinterp.$(LIBEXT): $(OBJECTS) $(XER
$OpenBSD: patch-src_Makefile_in,v 1.3 2005/12/24 20:05:27 steven Exp $
--- src/Makefile.in.orig Fri Nov 11 20:48:22 2005
+++ src/Makefile.in Sat Dec 24 12:30:10 2005
@@ -247,6 +247,9 @@ else
PIC_XERBLA = $(XERBLA)
endif
+SHLLIB_VER=$(SHLEXT).$(LIBoctinterp_VERSION)
+SHLEXT_VER=$(SHLLIB_VER)
+
ifeq ($(SHARED_LIBS), true)
ifeq ($(STATIC_LIBS), true)
LIBRARIES = liboctinterp.$(LIBEXT) liboctinterp.$(SHLEXT_VER)
@@ -270,12 +273,8 @@ liboctinterp.$(LIBEXT): $(OBJECTS) $(XER
$(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^
$(RANLIB) $@
@ -15,7 +25,7 @@ $OpenBSD: patch-src_Makefile_in,v 1.2 2005/11/02 18:20:58 alek Exp $
$(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(OCTINTERP_LINK_DEPS)
stamp-oct-links: $(OCT_FILES)
@@ -368,8 +364,7 @@ install-strip:
@@ -368,8 +367,7 @@ install-strip:
install-bin:
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
rm -f $(DESTDIR)$(bindir)/octave$(EXEEXT)
@ -25,7 +35,7 @@ $OpenBSD: patch-src_Makefile_in,v 1.2 2005/11/02 18:20:58 alek Exp $
.PHONY: install-bin
install-oct:
@@ -393,10 +388,8 @@ install-lib:
@@ -393,10 +391,8 @@ install-lib:
fi
if $(SHARED_LIBS); then \
rm -f $(DESTDIR)$(octlibdir)/liboctinterp.$(SHLEXT_VER); \

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PFRAG.shared,v 1.3 2005/11/02 18:20:58 alek Exp $
@lib lib/libcruft.so.${SHLIB_VER}
@lib lib/liboctave.so.${SHLIB_VER}
@lib lib/liboctinterp.so.${SHLIB_VER}
@comment $OpenBSD: PFRAG.shared,v 1.4 2005/12/24 20:05:27 steven Exp $
@lib lib/libcruft.so.${LIBcruft_VERSION}
@lib lib/liboctave.so.${LIBoctave_VERSION}
@lib lib/liboctinterp.so.${LIBoctinterp_VERSION}

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.4 2005/11/20 17:44:20 naddy Exp $
@comment $OpenBSD: PLIST,v 1.5 2005/12/24 20:05:27 steven Exp $
%%SHARED%%
bin/mkoctfile
bin/octave
@ -676,7 +676,7 @@ share/doc/octave/faq/Short-circuit-boolean-operators.html
share/doc/octave/faq/Unwind-protect.html
share/doc/octave/faq/Variable-length-argument-lists.html
share/doc/octave/faq/Variable-length-return-lists.html
share/doc/octave/faq/Version-${SHLIB_VER}.html
share/doc/octave/faq/Version-2.0.html
share/doc/octave/faq/What-else-do-I-need-.html
share/doc/octave/faq/What-is-Octave-.html
share/doc/octave/faq/index.html