From: Jakub Bogusz Date: Fri, 26 Apr 2002 23:45:59 +0000 (+0000) Subject: - updated shared patch for current libtool, fixed build X-Git-Tag: hdf-4_1r5-1~1 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=f31ffbfc9f9c963f453639bcd7bee7a44b66dc02;p=packages%2Fhdf.git - updated shared patch for current libtool, fixed build Changed files: hdf-shared.patch -> 1.2 hdf.spec -> 1.7 --- diff --git a/hdf-shared.patch b/hdf-shared.patch index 8598575..83f1228 100644 --- a/hdf-shared.patch +++ b/hdf-shared.patch @@ -30,7 +30,7 @@ diff -Nur HDF4.1r4.orig/hdf/src/Makefile.in HDF4.1r4/hdf/src/Makefile.in $(FC) $(FFLAGS) -c $< +.f.lo: -+ libtool --mode=compile $(FC) $(FFLAGS) -c $< ++ libtool --mode=compile $(LTTAG) $(FC) $(FFLAGS) -c $< + # Rules to make Free format Fortran90 include files from F77 include files # 1) change all col. 1 [Cc] to '!' @@ -373,7 +373,7 @@ diff -Nur HDF4.1r4.orig/mfhdf/fortran/Makefile.in HDF4.1r4/mfhdf/fortran/Makefil .f.o: $(FC) -c $(FFLAGS) $< +.f.lo: -+ libtool --mode=compile $(FC) -c $(FFLAGS) $< ++ libtool --mode=compile $(LTTAG) $(FC) -c $(FFLAGS) $< .F.o: ln -s $< $$$$.c \ && $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \ @@ -434,7 +434,7 @@ diff -Nur HDF4.1r4.orig/mfhdf/libsrc/Makefile.in HDF4.1r4/mfhdf/libsrc/Makefile. .f.o: $(FC) -c $(FFLAGS) $< +.f.lo: -+ libtool --mode=compile $(FC) -c $(FFLAGS) $< ++ libtool --mode=compile $(LTTAG) $(FC) -c $(FFLAGS) $< .F.o: ln -s $< $$$$.c \ && $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \ @@ -475,7 +475,7 @@ diff -Nur HDF4.1r4.orig/mfhdf/libsrc/Makefile.in HDF4.1r4/mfhdf/libsrc/Makefile. - $(AR) rcuv $@ $(LIBOBJS) - $(RANLIB) $@ -# $(LD) -b -o libmfhdf.sl $(LIBOBJS) -+ libtool $(CC) -o $(LIB_A) $(LIBOBJS) -L../../hdf/src/.libs -ldf -lz -ljpeg -lm -rpath /usr/lib ++ libtool $(CC) -o $(LIB_A) $(LIBOBJS) -L../../hdf/src -ldf -lz -ljpeg -lm -rpath /usr/lib # The following rule is for those makefiles needing to install object # modules in a library in another directory. They need only define diff --git a/hdf.spec b/hdf.spec index bb9b865..783dba6 100644 --- a/hdf.spec +++ b/hdf.spec @@ -11,12 +11,12 @@ Patch0: %{name}-system-libs.patch Patch1: %{name}-strdup.patch Patch2: %{name}-shared.patch URL: http://hdf.ncsa.uiuc.edu/ -BuildRequires: zlib-devel >= 1.1.3 -BuildRequires: libjpeg-devel >= 6b -BuildRequires: flex BuildRequires: bison -BuildRequires: libtool +BuildRequires: flex BuildRequires: gcc-g77 +BuildRequires: libjpeg-devel >= 6b +BuildRequires: libtool >= 0:1.4.2 +BuildRequires: zlib-devel >= 1.1.3 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -89,8 +89,16 @@ Narz ./configure %{_target_platform} \ --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} +# libtool 1.4d requires --tag for g77, but doesn't have good tag for g77 +grep -q -e '--tag' `which libtool` && LTTAG="--tag=dummy" + %{__make} CFLAGS="%{rpmcflags} -ansi -D_BSD_SOURCE -DHAVE_NETCDF" \ - FFLAGS="%{rpmcflags}" YACC="bison -y" + FFLAGS="%{rpmcflags}" YACC="bison -y" LTTAG="$LTTAG" + +# avoid relinking +cd mfhdf/libsrc +sed -e '/^relink_command/d' libmfhdf.la > libmfhdf.la.tmp +mv -f libmfhdf.la.tmp libmfhdf.la %install rm -rf $RPM_BUILD_ROOT @@ -111,7 +119,7 @@ mv -f $RPM_BUILD_ROOT%{_mandir}/man1/hdf.1 $RPM_BUILD_ROOT%{_mandir}/man7/hdf.7 # NOTE: don't let adapter change %%{_prefix}/man to %%{_mandir} for i in ncdump ncgen ; do mv -f $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/hdf$i - mv -f $RPM_BUILD_ROOT%{_mandir}/man1/$i.1 $RPM_BUILD_ROOT%{_mandir}/man1/hdf$i.1 + mv -f $RPM_BUILD_ROOT/usr/man/man1/$i.1 $RPM_BUILD_ROOT%{_mandir}/man1/hdf$i.1 done # remove unwanted path from libtool script