From c580d1cda71d1e5b24c0a4b4d3063aa099a6a852 Mon Sep 17 00:00:00 2001 From: John Kallimanis Date: Sat, 18 Apr 2020 22:02:44 +0300 Subject: [PATCH] New package: xephem-3.7.7 --- srcpkgs/xephem/files/XEphem | 1 + srcpkgs/xephem/files/xephem.desktop | 8 ++ .../xephem/patches/fix_Makefile_cross.patch | 118 ++++++++++++++++++ srcpkgs/xephem/template | 48 +++++++ 4 files changed, 175 insertions(+) create mode 100644 srcpkgs/xephem/files/XEphem create mode 100644 srcpkgs/xephem/files/xephem.desktop create mode 100644 srcpkgs/xephem/patches/fix_Makefile_cross.patch create mode 100644 srcpkgs/xephem/template diff --git a/srcpkgs/xephem/files/XEphem b/srcpkgs/xephem/files/XEphem new file mode 100644 index 00000000000..349b5f2ab74 --- /dev/null +++ b/srcpkgs/xephem/files/XEphem @@ -0,0 +1 @@ +XEphem.ShareDir: /usr/share/xephem diff --git a/srcpkgs/xephem/files/xephem.desktop b/srcpkgs/xephem/files/xephem.desktop new file mode 100644 index 00000000000..bea8752ef32 --- /dev/null +++ b/srcpkgs/xephem/files/xephem.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=XEphem +Type=Application +Comment=Interactive tool for astronomical ephemeris and sky simulation +Exec=xephem +TryExec=xephem +Icon=/usr/share/pixmaps/XEphem.png +Categories=Education;Science;Astronomy; diff --git a/srcpkgs/xephem/patches/fix_Makefile_cross.patch b/srcpkgs/xephem/patches/fix_Makefile_cross.patch new file mode 100644 index 00000000000..e16326e3978 --- /dev/null +++ b/srcpkgs/xephem/patches/fix_Makefile_cross.patch @@ -0,0 +1,118 @@ +Source: John Kallimanis +Upstream: Not applied. Unlikely to be accepted. No active development. +Reason: Fix the build system for multiarch, especially for prefixed binutils/tools. +diff -rupN xephem-3.7.7/GUI/xephem/Makefile xephem-3.7.7_patched/GUI/xephem/Makefile +--- xephem-3.7.7/GUI/xephem/Makefile 2015-08-10 00:36:50.000000000 +0300 ++++ xephem-3.7.7_patched/GUI/xephem/Makefile 2020-04-18 20:38:25.574554914 +0300 +@@ -30,7 +30,7 @@ MOTIFL = /usr/lib + endif + + # for linux and Apple OS X +-CC = gcc ++#CC = gcc + CLDFLAGS = -g + CFLAGS = $(LIBINC) $(CLDFLAGS) -O2 -Wall -I$(MOTIFI) -I/opt/X11/include + LDFLAGS = $(LIBLNK) $(CLDFLAGS) -L$(MOTIFL) -L/opt/X11/lib +diff -rupN xephem-3.7.7/libastro/Makefile xephem-3.7.7_patched/libastro/Makefile +--- xephem-3.7.7/libastro/Makefile 2006-02-24 05:37:31.000000000 +0200 ++++ xephem-3.7.7_patched/libastro/Makefile 2020-04-18 20:40:19.868560548 +0300 +@@ -4,7 +4,7 @@ + # compiler and flags + + # gcc +-CC = gcc ++#CC = gcc + CFLAGS= -O2 -Wall + + # macosx universal binary +@@ -83,8 +83,8 @@ OBJS = \ + vsop87_data.o + + libastro.a: $(HS) $(OBJS) +- ar rv $@ $(OBJS) +- ranlib $@ ++ $(AR) rv $@ $(OBJS) ++ $(RANLIB) $@ + + libastro.so: $(HS) $(OBJS) + $(CC) -shared -o $@ $(OBJS) +diff -rupN xephem-3.7.7/libip/Makefile xephem-3.7.7_patched/libip/Makefile +--- xephem-3.7.7/libip/Makefile 2009-01-05 22:53:46.000000000 +0200 ++++ xephem-3.7.7_patched/libip/Makefile 2020-04-18 20:41:48.796786939 +0300 +@@ -2,7 +2,7 @@ + # (C) 2001 Elwood Charles Downey + + # gcc +-CC = gcc ++#CC = gcc + CFLAGS= -I../libastro -O2 -Wall + + # macosx universal binary +@@ -36,11 +36,11 @@ OBJS = \ + HS = ip.h fsmatch.h + + libip.a: $(HS) $(OBJS) +- ar rv $@ $(OBJS) +- ranlib $@ ++ $(AR) rv $@ $(OBJS) ++ $(RANLIB) $@ + + libip.so: $(OBJS) +- gcc -shared -o $@ $(OBJS) ++ $(CC) -shared -o $@ $(OBJS) + + clobber: + rm -f *.o libip.a +diff -rupN xephem-3.7.7/liblilxml/Makefile xephem-3.7.7_patched/liblilxml/Makefile +--- xephem-3.7.7/liblilxml/Makefile 2006-02-24 05:37:32.000000000 +0200 ++++ xephem-3.7.7_patched/liblilxml/Makefile 2020-04-18 20:42:55.388207672 +0300 +@@ -4,7 +4,7 @@ + # compiler and flags + + # gcc +-CC = gcc ++#CC = gcc + CFLAGS= -O2 -Wall + + # macosx universal binary +@@ -27,8 +27,8 @@ HS = lilxml.h + OBJS = lilxml.o base64.o + + liblilxml.a: $(HS) $(OBJS) +- ar r $@ $(OBJS) +- ranlib $@ ++ $(AR) r $@ $(OBJS) ++ $(RANLIB) $@ + + liltest: liltest.o liblilxml.a + $(CC) $(LDFLAGS) -o liltest liltest.o liblilxml.a +diff -rupN xephem-3.7.7/libpng/Makefile xephem-3.7.7_patched/libpng/Makefile +--- xephem-3.7.7/libpng/Makefile 2006-02-24 05:36:49.000000000 +0200 ++++ xephem-3.7.7_patched/libpng/Makefile 2020-04-18 20:44:08.755569502 +0300 +@@ -8,7 +8,7 @@ ZLIBINC = ../libz + ZLIBLIB = ../libz + + # Compiler, linker, lib and other tools +-CC = gcc ++#CC = gcc + LD = $(CC) + AR = ar rcs + RANLIB = ranlib +diff -rupN xephem-3.7.7/libz/Makefile xephem-3.7.7_patched/libz/Makefile +--- xephem-3.7.7/libz/Makefile 2006-02-24 05:37:11.000000000 +0200 ++++ xephem-3.7.7_patched/libz/Makefile 2020-04-18 20:45:21.611935820 +0300 +@@ -17,11 +17,11 @@ OBJS = adler32.o \ + inffast.o + + libz.a: $(OBJS) +- ar rc libz.a $(OBJS) +- -ranlib libz.a ++ $(AR) rc libz.a $(OBJS) ++ $(RANLIB) libz.a + + testzlib: testzlib.o libz.a +- cc $(LDFLAGS) -o testzlib testzlib.o libz.a ++ $(CC) $(LDFLAGS) -o testzlib testzlib.o libz.a + + clean: + rm -f *.o *.a testzlib diff --git a/srcpkgs/xephem/template b/srcpkgs/xephem/template new file mode 100644 index 00000000000..2b675f494a1 --- /dev/null +++ b/srcpkgs/xephem/template @@ -0,0 +1,48 @@ +# Template file for 'xephem' +pkgname=xephem +version=3.7.7 +revision=1 +build_style=gnu-makefile +make_build_args="-C GUI/xephem" +makedepends="libpng-devel lesstif-devel libICE-devel libSM-devel libX11-devel libXau-devel + libxcb-devel libXdmcp-devel libXmu-devel libXp-devel libXt-devel libXext-devel groff" +short_desc="Interactive astronomical ephemeris for the serious amateur astronomer" +maintainer="John Kallimanis " +license="Proprietary" +homepage="https://www.clearskyinstitute.com/xephem/" +distfiles="https://www.clearskyinstitute.com/xephem/xephem-${version}.tgz" +checksum="fb0b889218322c1cc0b994da7125e624e4f0112d9da1c468936600d1179e55de" +patch_args="-p1" + +do_build() { + make -C GUI/xephem +} + +do_install() { + vlicense Copyright Xephem-License + + cd GUI/xephem + vbin xephem + + vmkdir /usr/share/xephem + vcopy auxil /usr/share/xephem + vcopy catalogs /usr/share/xephem + vcopy fifos /usr/share/xephem + vcopy fits /usr/share/xephem + vcopy gallery /usr/share/xephem + vcopy lo /usr/share/xephem + vman xephem.1 + + vmkdir /usr/share/xephem/help + vcopy help/xephem.html /usr/share/xephem/help/ + vcopy help/png /usr/share/xephem/help/ + + vmkdir /etc + vcopy "${FILESDIR}"/XEphem /etc + + vmkdir /usr/share/applications + vcopy "${FILESDIR}"/xephem.desktop /usr/share/applications/ + + vmkdir /usr/share/pixmaps + vcopy XEphem.png /usr/share/pixmaps/ +}