Created
January 23, 2016 10:24
-
-
Save blippy/14bd7fe69e3108fb91e5 to your computer and use it in GitHub Desktop.
Arch Linux patch to date-fortran-1.2.0-1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -aurN datetime-fortran-1.2.0.pristine/Makefile datetime-fortran-1.2.0.new/Makefile | |
| --- datetime-fortran-1.2.0.pristine/Makefile 2016-01-23 10:12:05.230627072 +0000 | |
| +++ datetime-fortran-1.2.0.new/Makefile 2016-01-23 10:12:33.990628308 +0000 | |
| @@ -1,12 +1,37 @@ | |
| +# To compile a file foo.f90 containing `use datetime_module' | |
| +# issue a command like: | |
| +# gfortran -o foo `pkg-config --cflags datetime-fortran` foo.f90 -ldatetime | |
| + | |
| +# If Arch Linux, assume a package manager, and go to /usr | |
| +ifneq ("$(wildcard /etc/arch-release)","") | |
| +PREFIX=/usr | |
| +else | |
| +PREFIX=/usr/local | |
| +endif | |
| + | |
| + | |
| + | |
| +PKGFILE=$(PREFIX)/share/pkgconfig/datetime-fortran.pc | |
| FC = gfortran | |
| FCFLAGS = -Wall -O0 -C -fbacktrace | |
| +LIBS = datetime_module.mod libdatetime.a | |
| # Rules | |
| all: datetime.f90 | |
| $(FC) -c $(FCFLAGS) datetime.f90 | |
| ar r libdatetime.a datetime.o | |
| - | |
| + | |
| .PHONY: | |
| clean: | |
| rm -f datetime.o datetime_module.mod libdatetime.a | |
| + | |
| +install: | |
| + m4 --define=PREFIX=$(PREFIX) datetime-fortran.pc.in >$(PKGFILE) | |
| + cp $(LIBS) $(PREFIX)/lib | |
| + | |
| +uninstall: | |
| + rm $(PKGFILE) | |
| + cd $(PREFIX)/lib | |
| + rm $(LIBS) | |
| + | |
| diff -aurN datetime-fortran-1.2.0.pristine/datetime-fortran.pc.in datetime-fortran-1.2.0.new/datetime-fortran.pc.in | |
| --- datetime-fortran-1.2.0.pristine/datetime-fortran.pc.in 1970-01-01 01:00:00.000000000 +0100 | |
| +++ datetime-fortran-1.2.0.new/datetime-fortran.pc.in 2016-01-23 10:12:44.700628781 +0000 | |
| @@ -0,0 +1,9 @@ | |
| +prefix=PREFIX | |
| +libdir=${prefix}/lib | |
| + | |
| +Name: datetime-fortran | |
| +Description: Datetime library and module for Fortran | |
| +URL: https://github.com/milancurcic/datetime-fortran | |
| +Version: 1.2.0 | |
| +Cflags: -I${libdir} | |
| +Libs: -ldatetime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment