diff options
author | joerg <joerg@pkgsrc.org> | 2013-09-20 23:06:07 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-09-20 23:06:07 +0000 |
commit | 0f54e781780f53e2b08c1ddb71f3c92acbd8bdf0 (patch) | |
tree | 6ab12e9bcb8cb6093707997bc6050f0949f54c27 /lang/g95 | |
parent | ddae7b632696a07501f8311fa29b9cb5e742e110 (diff) | |
download | pkgsrc-0f54e781780f53e2b08c1ddb71f3c92acbd8bdf0.tar.gz |
Build libf95 as shared library. Add rpath entries automatically as
needed. Bump revision.
Diffstat (limited to 'lang/g95')
-rw-r--r-- | lang/g95/Makefile | 14 | ||||
-rw-r--r-- | lang/g95/PLIST | 4 | ||||
-rw-r--r-- | lang/g95/distinfo | 9 | ||||
-rw-r--r-- | lang/g95/patches/patch-ab | 16 | ||||
-rw-r--r-- | lang/g95/patches/patch-g95spec.c | 15 | ||||
-rw-r--r-- | lang/g95/patches/patch-gcc_Makefile.in | 15 | ||||
-rw-r--r-- | lang/g95/patches/patch-libf95.a-0.93_Makefile.am | 73 | ||||
-rw-r--r-- | lang/g95/patches/patch-libf95.a-0.93_runtime_main.c | 28 |
8 files changed, 158 insertions, 16 deletions
diff --git a/lang/g95/Makefile b/lang/g95/Makefile index 47ee1e7406e..234174ef9eb 100644 --- a/lang/g95/Makefile +++ b/lang/g95/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.18 2013/07/28 12:54:52 obache Exp $ +# $NetBSD: Makefile,v 1.19 2013/09/20 23:06:07 joerg Exp $ DISTNAME= g95_source PKGNAME= g95-0.93 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= lang MASTER_SITES= http://ftp.g95.org/v${PKGVERSION_NOREV}/ EXTRACT_SUFX= .tgz @@ -14,7 +14,8 @@ HOMEPAGE= http://www.g95.org/ COMMENT= Fortran 95 compiler from g95.org LICENSE= gnu-gpl-v2 -USE_TOOLS+= gmake gtar +USE_TOOLS+= gmake gtar automake autoconf +USE_LIBTOOL= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --with-gcc-dir=${GCC_DIR} WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} @@ -44,13 +45,16 @@ post-extract: cd ${WRKSRC} && ${GTAR} -xzf libf95.a-${PKGVERSION_NOREV}.tar.gz pre-configure: + cd ${WRKSRC}/libf95.a-${PKGVERSION_NOREV} && autoreconf -i rm -f ${GCC_DIR}/config.sub ${GCC_DIR}/config.guess ln -fs ${PKGSRCDIR}/mk/gnu-config/config.sub ${GCC_DIR}/config.sub ln -fs ${PKGSRCDIR}/mk/gnu-config/config.guess ${GCC_DIR}/config.guess - cd ${GCC_G95_DIR} && ${GCC_CONFIGURE_SCRIPT} ${GCC_CONFIGURE_ARGS} && ${GMAKE} + cd ${GCC_G95_DIR} && ${SETENV} ${CONFIGURE_ENV} ${GCC_CONFIGURE_SCRIPT} ${GCC_CONFIGURE_ARGS} + cd ${GCC_G95_DIR} && ${SETENV} ${MAKE_ENV} ${GMAKE} -j${MAKE_JOBS:U1:Q} post-build: - cd ${WRKSRC}/libf95.a-${PKGVERSION_NOREV} && ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} && ${GMAKE} + cd ${WRKSRC}/libf95.a-${PKGVERSION_NOREV} && ${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} + cd ${WRKSRC}/libf95.a-${PKGVERSION_NOREV} && ${SETENV} ${MAKE_ENV} ${GMAKE} -j${MAKE_JOBS:U1:Q} post-install: cd ${WRKSRC}/libf95.a-${PKGVERSION_NOREV} && ${GMAKE} install DESTDIR=${DESTDIR:Q} diff --git a/lang/g95/PLIST b/lang/g95/PLIST index 3f94537080f..98dcd390e76 100644 --- a/lang/g95/PLIST +++ b/lang/g95/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 2013/05/20 05:47:34 adam Exp $ +@comment $NetBSD: PLIST,v 1.5 2013/09/20 23:06:07 joerg Exp $ bin/f95 bin/g95 bin/${MACHINE_GNU_PLATFORM}-g95 @@ -8,6 +8,6 @@ lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/libgcc_eh.a lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/libgcc_s.so lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/libgcc_s.so.1 lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/libgcc.a -lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/libf95.a +lib/gcc-lib/${MACHINE_GNU_PLATFORM}/4.1.2/libf95.la share/doc/g95/G95Manual.pdf share/doc/g95/INSTALL diff --git a/lang/g95/distinfo b/lang/g95/distinfo index 969bfa7e4b6..25e538ec42b 100644 --- a/lang/g95/distinfo +++ b/lang/g95/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2013/07/28 12:54:52 obache Exp $ +$NetBSD: distinfo,v 1.17 2013/09/20 23:06:07 joerg Exp $ SHA1 (g95_source.tgz) = b5e503fd6459b65cbda73190685f9490230d9cff RMD160 (g95_source.tgz) = 98d03e9a1835f4b3553a72a798bdf1d90a757176 @@ -6,8 +6,10 @@ Size (g95_source.tgz) = 1355198 bytes SHA1 (gcc-core-4.1.2.tar.bz2) = d6875295f6df1bec4a6f4ab8f0da54bfb8d97306 RMD160 (gcc-core-4.1.2.tar.bz2) = 612cbd5b795f7095fb3f565e6a8eaaee82c472c5 Size (gcc-core-4.1.2.tar.bz2) = 17485561 bytes -SHA1 (patch-ab) = 74187ee99e3e383333219cbc53676c07ca03ff19 +SHA1 (patch-ab) = 7429a4da26aa573dcdd94bf417da1e009f95d273 SHA1 (patch-ac) = b20a90cc2f9078cf0048980b75fa6836da0f28a8 +SHA1 (patch-g95spec.c) = d6f434e715835cd39511c45ed18632c8401b78a2 +SHA1 (patch-gcc_Makefile.in) = cc5cc142a85612ebf2d38513e4b05db0ae795268 SHA1 (patch-gcc_config.gcc) = 9da8f32372c64b1590d97e3f26aec0d5652cc959 SHA1 (patch-gcc_config_dragonfly-spec.h) = bf0c97caa314714542cf8cc63fdf0c73bda80511 SHA1 (patch-gcc_config_dragonfly.h) = 6d46b7b4637a20b36e19a15e1eaffdfff6638de9 @@ -19,6 +21,7 @@ SHA1 (patch-gcc_ginclude_stddef.h) = 60f51a470e03173803b5e20b1fa4d6882e8d1fe9 SHA1 (patch-gcc_toplev.h) = 4894b45bf0fd30de0610a36827ef1089e0ec6bd5 SHA1 (patch-libf95.a-0.92_configure) = e23998692b410acaabaf24f591b659d2b229bcca SHA1 (patch-libf95.a-0.92_io_atof.c) = 0c3a209815be3a97d984cb9a15ee888f93110d1d +SHA1 (patch-libf95.a-0.93_Makefile.am) = a5e6a8fa0cd05e6e4a581c027d97cdf68dd2a6f8 SHA1 (patch-libf95.a-0.93_intrinsics_dot__product10.c) = a2fe19bab2a6f719f541692fd4ef7e67766a18e5 SHA1 (patch-libf95.a-0.93_intrinsics_matmul10.c) = 30609c3183a98610e4005fd4c0d12cccec0855a1 SHA1 (patch-libf95.a-0.93_intrinsics_random.c) = 5445f78b267f742a2bf711aa0f5e06683dda1a68 @@ -26,4 +29,4 @@ SHA1 (patch-libf95.a-0.93_io_read.c) = 594bcfb15e59dcaaec5a6a21a58af17e8f41eae9 SHA1 (patch-libf95.a-0.93_math_ff.c) = 353121bc08a86765d18b0e6f051ba91f7e65e9c2 SHA1 (patch-libf95.a-0.93_math_x87.S) = d1eb02bd2358b6abb9b8dc3e32629cba540adcc4 SHA1 (patch-libf95.a-0.93_quad_power16.c) = fc7375aa90ecf75bb8ba26d41739614040b16e09 -SHA1 (patch-libf95.a-0.93_runtime_main.c) = 8b870b363c3f0d108979fe44248632b77258eb0d +SHA1 (patch-libf95.a-0.93_runtime_main.c) = a993a28e0c766c1ae0c73c5bda91b1446d6d944d diff --git a/lang/g95/patches/patch-ab b/lang/g95/patches/patch-ab index 1de3b8d6312..5ada1e7fd44 100644 --- a/lang/g95/patches/patch-ab +++ b/lang/g95/patches/patch-ab @@ -1,10 +1,20 @@ -$NetBSD: patch-ab,v 1.7 2013/05/20 05:47:34 adam Exp $ +$NetBSD: patch-ab,v 1.8 2013/09/20 23:06:07 joerg Exp $ Use $(host_alias) as the program prefix so it matches ${MACHINE_GNU_PLATFORM} +Pass down correct path for libf95 to g95specs.c. + --- Makefile.in.orig 2010-04-22 04:23:24.000000000 +0000 +++ Makefile.in -@@ -1418,7 +1418,7 @@ clean-local: +@@ -15,6 +15,7 @@ + + @SET_MAKE@ + ++AM_CPPFLAGS= -DFORTRAN_LIBRARY_RPATH="\"-Wl,$(LINKER_RPATH_FLAG)$(DEST_LIBDIR)\"" + + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ +@@ -1418,7 +1419,7 @@ clean-local: rm -f options.tmp options.c options.h version.c install-exec-hook: @@ -13,7 +23,7 @@ Use $(host_alias) as the program prefix so it matches ${MACHINE_GNU_PLATFORM} install-data-hook: -ln -sf f951$(EXEEXT) $(DESTDIR)@DEST_LIBDIR@/cc1 -@@ -1429,8 +1429,9 @@ install-data-hook: +@@ -1429,8 +1430,9 @@ install-data-hook: ranlib $(DESTDIR)@DEST_LIBDIR@/libgcc_eh.a ; \ ranlib $(DESTDIR)@DEST_LIBDIR@/libgcc.a ; \ fi diff --git a/lang/g95/patches/patch-g95spec.c b/lang/g95/patches/patch-g95spec.c new file mode 100644 index 00000000000..75e5d140384 --- /dev/null +++ b/lang/g95/patches/patch-g95spec.c @@ -0,0 +1,15 @@ +$NetBSD: patch-g95spec.c,v 1.1 2013/09/20 23:06:07 joerg Exp $ + +Add rpath to libf95. + +--- g95spec.c.orig 2008-10-15 14:41:42.000000000 +0000 ++++ g95spec.c +@@ -527,6 +527,8 @@ For more information about these matters + case 1: + if (need_math) + append_arg (MATH_LIBRARY); ++ case 2: ++ append_arg (FORTRAN_LIBRARY_RPATH); + default: + break; + } diff --git a/lang/g95/patches/patch-gcc_Makefile.in b/lang/g95/patches/patch-gcc_Makefile.in new file mode 100644 index 00000000000..1906066ec36 --- /dev/null +++ b/lang/g95/patches/patch-gcc_Makefile.in @@ -0,0 +1,15 @@ +$NetBSD: patch-gcc_Makefile.in,v 1.1 2013/09/20 23:06:07 joerg Exp $ + +Add gcc libdir to a programs rpath so that _this gcc's_ support libraries +are found. + +--- ../gcc-4.1.2/gcc/Makefile.in.orig 2012-03-07 10:59:56.000000000 +0000 ++++ ../gcc-4.1.2/gcc/Makefile.in +@@ -1597,6 +1597,7 @@ c-pch.o : c-pch.c $(CONFIG_H) $(SYSTEM_H + # Language-independent files. + + DRIVER_DEFINES = \ ++ -DLINK_LIBGCC_SPEC="\"%D $(LINKER_RPATH_FLAG)$(libdir)/gcc/$(target_noncanonical)/$(gcc_version) \"" \ + -DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \ + -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \ + -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \ diff --git a/lang/g95/patches/patch-libf95.a-0.93_Makefile.am b/lang/g95/patches/patch-libf95.a-0.93_Makefile.am new file mode 100644 index 00000000000..afe5ff7212b --- /dev/null +++ b/lang/g95/patches/patch-libf95.a-0.93_Makefile.am @@ -0,0 +1,73 @@ +$NetBSD: patch-libf95.a-0.93_Makefile.am,v 1.1 2013/09/20 23:06:07 joerg Exp $ + +Produce shared libf95. + +--- libf95.a-0.93/Makefile.am.orig 2008-10-09 01:29:42.000000000 +0000 ++++ libf95.a-0.93/Makefile.am +@@ -1,11 +1,13 @@ +- +-extra_LIBRARIES=libf95.a +- + extradir = @DEST_LIBDIR@ ++LIBTOOL= libtool ++AM_LIBTOOLFLAGS= --tag=CC + ++install-exec-local: ++ ${LIBTOOL} --mode=install ${INSTALL} libf95.la ${DESTDIR}${extradir} + +- +-libf95_a_SOURCES=intrinsics/adjust.c intrinsics/all.c intrinsics/any.c \ ++noinst_LTLIBRARIES = libf95.la ++libf95_la_LDFLAGS= -version 1:0:0 -rpath ${extradir} ++libf95_la_SOURCES=intrinsics/adjust.c intrinsics/all.c intrinsics/any.c \ + intrinsics/command.c intrinsics/count.c intrinsics/cshift.c \ + intrinsics/dot_product.c intrinsics/dot_product10.c \ + intrinsics/eoshift.c intrinsics/gerror.c intrinsics/get_environ.c \ +@@ -34,31 +36,31 @@ unix/exit.c unix/ftell.c unix/getarg.c u + unix/rename.c unix/signal.c unix/system.c unix/time.c unix/unlink.c + + if HAVE_REAL_10_AM +-libf95_a_SOURCES += math/x87.S ++libf95_la_SOURCES += math/x87.S + endif + + if HAVE_RESUME_AM +-libf95_a_SOURCES += runtime/resume.c ++libf95_la_SOURCES += runtime/resume.c + endif + + if HAVE_UNIX_AM +-libf95_a_SOURCES += unix/fpu_trap.c unix/getlog.c unix/getpid.c +-libf95_a_SOURCES += unix/system_clock.c unix/dtime.c unix/etime.c +-libf95_a_SOURCES += unix/cpu_time.c unix/date_and_time.c unix/fdate.c +-libf95_a_SOURCES += unix/hostnm.c unix/getuid.c unix/idate.c unix/itime.c +-libf95_a_SOURCES += unix/sleep.c unix/stat.c unix/unix_io.c unix/secnds.c +-libf95_a_SOURCES += unix/second.c ++libf95_la_SOURCES += unix/fpu_trap.c unix/getlog.c unix/getpid.c ++libf95_la_SOURCES += unix/system_clock.c unix/dtime.c unix/etime.c ++libf95_la_SOURCES += unix/cpu_time.c unix/date_and_time.c unix/fdate.c ++libf95_la_SOURCES += unix/hostnm.c unix/getuid.c unix/idate.c unix/itime.c ++libf95_la_SOURCES += unix/sleep.c unix/stat.c unix/unix_io.c unix/secnds.c ++libf95_la_SOURCES += unix/second.c + endif + + if HAVE_WINDOWS_AM +-libf95_a_SOURCES += windows/fpu_trap_win.c windows/dtime_win.c +-libf95_a_SOURCES += windows/etime_win.c windows/system_clock_win.c +-libf95_a_SOURCES += windows/cpu_time_win.c windows/date_and_time_win.c +-libf95_a_SOURCES += windows/hostnm_win.c windows/itime_win.c +-libf95_a_SOURCES += windows/getlog_win.c windows/getpid_win.c +-libf95_a_SOURCES += windows/fdate_win.c windows/sleep_win.c +-libf95_a_SOURCES += windows/windows_io.c windows/secnds_win.c +-libf95_a_SOURCES += windows/second_win.c windows/stat_win.c windows/idate_win.c ++libf95_la_SOURCES += windows/fpu_trap_win.c windows/dtime_win.c ++libf95_la_SOURCES += windows/etime_win.c windows/system_clock_win.c ++libf95_la_SOURCES += windows/cpu_time_win.c windows/date_and_time_win.c ++libf95_la_SOURCES += windows/hostnm_win.c windows/itime_win.c ++libf95_la_SOURCES += windows/getlog_win.c windows/getpid_win.c ++libf95_la_SOURCES += windows/fdate_win.c windows/sleep_win.c ++libf95_la_SOURCES += windows/windows_io.c windows/secnds_win.c ++libf95_la_SOURCES += windows/second_win.c windows/stat_win.c windows/idate_win.c + endif + + EXTRA_DIST=io/power5.h io/p5.py io/p10.py diff --git a/lang/g95/patches/patch-libf95.a-0.93_runtime_main.c b/lang/g95/patches/patch-libf95.a-0.93_runtime_main.c index 0c19b8aa1cb..a35914e3783 100644 --- a/lang/g95/patches/patch-libf95.a-0.93_runtime_main.c +++ b/lang/g95/patches/patch-libf95.a-0.93_runtime_main.c @@ -1,10 +1,28 @@ -$NetBSD: patch-libf95.a-0.93_runtime_main.c,v 1.1 2013/07/28 12:54:52 obache Exp $ +$NetBSD: patch-libf95.a-0.93_runtime_main.c,v 1.2 2013/09/20 23:06:07 joerg Exp $ * fixes missing restore stack address. PR pkg/47906 +* Make MAIN_ weak to allow linking libf95 dynamically. --- libf95.a-0.93/runtime/main.c.orig 2010-04-18 15:47:28.000000000 +0000 +++ libf95.a-0.93/runtime/main.c -@@ -50,9 +50,11 @@ int main(int argc, char *argv[]) { +@@ -37,11 +37,12 @@ + void __main(void) {} + #endif + +- +- +- + /* main()-- Entry point for the fortran program */ +-void MAIN_(void); ++#if __GNUC__ - 0 == 4 && __GNUC_MINOR__ < 2 ++extern void weak_MAIN_(void) __attribute__((__weakref__("MAIN_"))); ++#else ++static void weak_MAIN_(void) __attribute__((__weakref__("MAIN_"))); ++#endif + + int main(int argc, char *argv[]) { + +@@ -50,17 +51,25 @@ int main(int argc, char *argv[]) { * unaligned. */ #if HAVE_REAL_10 == 1 || HAVE_REAL_10 == 2 @@ -17,7 +35,11 @@ $NetBSD: patch-libf95.a-0.93_runtime_main.c,v 1.1 2013/07/28 12:54:52 obache Exp #endif g95_runtime_start(argc, argv); -@@ -62,5 +64,10 @@ int main(int argc, char *argv[]) { + +- MAIN_(); /* Call the Fortran main program. */ ++ if (weak_MAIN_) ++ weak_MAIN_(); /* Call the Fortran main program. */ + memory_done(); g95_runtime_stop(); |