summaryrefslogtreecommitdiff
path: root/sci-astronomy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-03-15 00:29:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-03-15 00:29:11 +0000
commitbcdfc870ecd1de7eea04df21ec3a069328b2e29f (patch)
tree9d01787ebec0b4f31b72866fbd078d3f0b27fa11 /sci-astronomy
parent37185a5f2fd3d3e821d63ca90dffe9629d147da1 (diff)
gentoo auto-resync : 15:03:2025 - 00:29:11
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/Manifest.gzbin6199 -> 6202 bytes
-rw-r--r--sci-astronomy/montage/Manifest6
-rw-r--r--sci-astronomy/montage/files/montage-6.1-montagelib-dep.patch30
-rw-r--r--sci-astronomy/montage/files/montage-6.1-presentation-strcpy.patch21
-rw-r--r--sci-astronomy/montage/files/montage-6.1-prototypes.patch283
-rw-r--r--sci-astronomy/montage/files/montage-6.1-tcol-cntr.patch22
-rw-r--r--sci-astronomy/montage/montage-6.1.ebuild71
7 files changed, 433 insertions, 0 deletions
diff --git a/sci-astronomy/Manifest.gz b/sci-astronomy/Manifest.gz
index f795d6f6e20e..248d969b5b6f 100644
--- a/sci-astronomy/Manifest.gz
+++ b/sci-astronomy/Manifest.gz
Binary files differ
diff --git a/sci-astronomy/montage/Manifest b/sci-astronomy/montage/Manifest
index fff9e17f1474..21e3096a0a4f 100644
--- a/sci-astronomy/montage/Manifest
+++ b/sci-astronomy/montage/Manifest
@@ -2,7 +2,13 @@ AUX montage-4.1-fix_format_errors.patch 705 BLAKE2B 8eed539374451d5124adb3d32ca9
AUX montage-4.1-initdistdata.patch 619 BLAKE2B 62093c780263c8b70f2df0de459c8a6b420d187ea9921b4ffc84435fbffb4f6de100a926ce56a5f2cf7897e2a6c9f93ef9bbffb2b5f6bfcaffcf317d6bf0d2da SHA512 6b4b195f804fb16dd3acdfb53288800ac07af9b05749ad8e8305fe415488e921a65ffb6ce19632da420dea6235eb3ed28826a437a8b7ad22869065a916422ea5
AUX montage-5.0-c23.patch 907 BLAKE2B c2d35544255580783d6106018b1d1d88f34f93aa6fb49b137924616799a5ac934152abd7d7d5e45d46150a4c52afe344cc34072115f621e6802869ad43ebabae SHA512 7813a84e8d6da50b34c7b814abd0fd156c789736c6cc8d39b06c417684db049fb719b6be480d8cf5b2b2b8dc6ad94bc7e89bd90b5018b807a5dd3cf5103e3bc8
AUX montage-5.0-fix_freetype_incude.patch 1164 BLAKE2B 94d791eb684d9a6a725a90b9361f1ef29d6654c59bfe4b0620a1af4412a49ade15fae9f6e0ff5b63134574e73a7ff75190f40df4bc3883cfc6e9c286e9d63573 SHA512 1ca955f06765fc90164190a090ec177a06c9cb359fe93b43b8553af06b8eb4a06c8d2685d76fbee0fc70dad525a184b9a4dfde8acef4f4d9703610fb69b73ad5
+AUX montage-6.1-montagelib-dep.patch 922 BLAKE2B d60e6507fc83bb82d4ac4886392634713bf49b0aa874e20c60ef183a991837e9bba7e14c23099572cdde78ac83c913ac4f98592b94c2593ad30428c2d853abcc SHA512 a856a0187e9992187877232d66d953003721bb2953e7375da508f5626168b8f363f4c0eb081cf88720e299216f2329e5ebf20fc8168024d61a9d9499b7d3749b
+AUX montage-6.1-presentation-strcpy.patch 579 BLAKE2B 98af1bf6b13628744f2c8856da58d3ce1b397a8e0bd87c6b2c8877d677c5c66e02bafc57a21d8b7114c23f172d5091662addb3866ac6fb5466342650c6b90ff3 SHA512 f2550fc5ae9ac511198d4dff16f857a48d5c1592682c701d931b2757838a522918012467721ba9427c2c3761044ea44aa450ae14ab6b262f1fb17c628fad78c4
+AUX montage-6.1-prototypes.patch 9633 BLAKE2B 4982739e05dceefc1345d816c31e91fae7db1d45008fe98ae631e4f24f37e259104ad18b166959822e4e8fb1bc42148fceded22ef3aacf5c85680967bf8ad47d SHA512 1d37b3fdb488c3c0e8380536171177a7e5283b4df67360bdd526d13b986e7854c4b72cd281ebe380028c37e5c06ff7d6d702fe085a1b57868670d522011f85e8
+AUX montage-6.1-tcol-cntr.patch 558 BLAKE2B be89a096a5177d32c87ca4c89307ca9e720bf6d5283ff98535a89d7655058ad188ef1ae8afad1763a162424ad9db6e185d2b25137294082e636b1c44861e89be SHA512 747101bf25ba5c2404f7b5b5e00953978b750c43644df4f21faa8b1f31d8d737ba1ec1616829f1480da019d454b16fcd59e35fd385bb1b9e01f533c9569c6b76
DIST Montage_v5.0.tar.gz 14663443 BLAKE2B b7dea04a0b9650b3e32bc425891c1221d60123c29663013b4af860efc238dee7552a2b55514ad7eda3be659873e3f14d2039b2e6eea20f565d64c7b8bd055069 SHA512 1396c7f846db4844d2e861622d152f2115ad4c684da02bb14116dfe3d01b559feaf29572663d0dfd234aa50843afaca3bb072d9127fbb2b539a14327c48499ae
+DIST montage-6.1.tar.gz 45025917 BLAKE2B cae563e0a90bf4be4682964f817c885927ad75771266ad1acc4fd891c4cc56572e7552cfac0fa34b5f8071003ead8b94cf57824b5f872ae9edf3c2b5a5e39836 SHA512 063e7701f2e93031d21896addbb5e2de86e71d41a13241987432fd25ae98bfb1cf18b5d955dcaacf5672d58996a8f4aae1b19ca5d5587c7f0ae0daf0d7bed862
EBUILD montage-5.0-r1.ebuild 1799 BLAKE2B 49943069dc0d22bc2ed8761eae3c5786a32767efc35a663d12c54898424d89c52b53db933a73d95b938e2d09f9d6f99ee220a04641220c136a6296161a1ab046 SHA512 4468b80a9cffd4d3cd193d149081a0c07ece3d5d88c281a5e2190a09cb1d0ecae3d16470b0fa1128b9b452843e689c81affd7da5c15d10a6b1521d8d00743698
EBUILD montage-5.0.ebuild 1651 BLAKE2B 2199e85858ecc798b6664d620f4685703a7c973ebf33cf4bb39f37abfd921cf18dbde1fb78812301215c152e5e8b56948e1e90901281881d9c88e4f121133e37 SHA512 0d15f64a7c075082bb098a69453cbbaf61d81c914388931e4352155eac871f76c36a3abd2c29be8f0afc58ef22ba64047f3045402cf10b2c7772dc0418d5c13a
+EBUILD montage-6.1.ebuild 1922 BLAKE2B 0893f5a9a23038b6f7553beedd450c6599a0b1ab24de240c4fbacdad8b333923b00fec56aa1a7a6993edd7e4434dbefba06e2a8ac87cfd06ec9f3d90d98bdde9 SHA512 02e6104e9679ed562ccd27ca67b7c5ca76e7ae573305793b59b362e236013f2119c14a39b4d2e1757ea6e4485bef35dfbba372b5d295f7d70e16c8e963182942
MISC metadata.xml 1032 BLAKE2B 998c8753167679cd4446dc223990e6c6b5af858a6561d912656da9aa1026b6f3ac407d1e86d43b7fda36cdaa5eff0d0b381dae6f99512ab8f1660a6ba54b83ca SHA512 ce0b489ca4f62e1e30ec6e39a53dbf11fe0bca57e3169d33a734c6cc8a48ba721d9693adde15a2ac88228be2eb341a7328e12062fee98f76f99887de1f0b0191
diff --git a/sci-astronomy/montage/files/montage-6.1-montagelib-dep.patch b/sci-astronomy/montage/files/montage-6.1-montagelib-dep.patch
new file mode 100644
index 000000000000..3bb2598465e2
--- /dev/null
+++ b/sci-astronomy/montage/files/montage-6.1-montagelib-dep.patch
@@ -0,0 +1,30 @@
+From: Ole Streicher <olebole@debian.org>
+Date: Fri, 20 Dec 2024 08:17:51 +0100
+Subject: Add dependency for Montagelib::lib target
+
+---
+ MontageLib/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/MontageLib/Makefile b/MontageLib/Makefile
+index f37df2d..9d41a23 100644
+--- a/MontageLib/Makefile
++++ b/MontageLib/Makefile
+@@ -49,7 +49,7 @@ pgm:
+ (cd FitExec && $(MAKE) && $(MAKE) install)
+ (cd ProjExec && $(MAKE) && $(MAKE) install)
+
+-lib:
++lib: pgm
+ rm -f libmontage.a libmontage.so libmontagepy.so
+ ar q libmontage.a \
+ util/checkFile.o util/checkHdr.o util/checkWCS.o \
+@@ -136,7 +136,7 @@ lib:
+ DiffFitExec/montageDiffFitExec.o \
+ ProjExec/montageProjExec.o
+
+-pythonlibs:
++pythonlibs: pgm
+ rm -f ../python/MontagePy/lib/*.o
+ mkdir -p ../python/MontagePy/lib
+ cp util/checkFile.o util/checkHdr.o util/checkWCS.o \
diff --git a/sci-astronomy/montage/files/montage-6.1-presentation-strcpy.patch b/sci-astronomy/montage/files/montage-6.1-presentation-strcpy.patch
new file mode 100644
index 000000000000..8058a70588e9
--- /dev/null
+++ b/sci-astronomy/montage/files/montage-6.1-presentation-strcpy.patch
@@ -0,0 +1,21 @@
+From: Ole Streicher <olebole@debian.org>
+Date: Tue, 19 Mar 2024 11:28:54 +0100
+Subject: Include string.h in mPresentation.c to declare strcpy()
+
+Closes: #1066317
+---
+ grid/Pegasus/mPresentation.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/grid/Pegasus/mPresentation.c b/grid/Pegasus/mPresentation.c
+index 72da6be..e059e65 100644
+--- a/grid/Pegasus/mPresentation.c
++++ b/grid/Pegasus/mPresentation.c
+@@ -14,6 +14,7 @@ Version Developer Date Change
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <strings.h>
++#include <string.h>
+
+ #define MAXLEN 20000
+
diff --git a/sci-astronomy/montage/files/montage-6.1-prototypes.patch b/sci-astronomy/montage/files/montage-6.1-prototypes.patch
new file mode 100644
index 000000000000..5f77f9077b2c
--- /dev/null
+++ b/sci-astronomy/montage/files/montage-6.1-prototypes.patch
@@ -0,0 +1,283 @@
+https://github.com/Caltech-IPAC/Montage/pull/85
+--- /dev/null
++++ b/Montage/filePath.h
+@@ -0,0 +1,3 @@
++#pragma once
++
++char *filePath(char *path, char *fname);
+--- a/MontageLib/ArchiveExec/montageArchiveExec.c
++++ b/MontageLib/ArchiveExec/montageArchiveExec.c
+@@ -17,7 +17,6 @@ extern int optind, opterr;
+
+ extern int getopt(int argc, char *const *argv, const char *options);
+
+-char *svc_value();
+
+
+ /*-*****************************************************************/
+--- a/grid/Globus/ExecTG/mExecTG.c
++++ b/grid/Globus/ExecTG/mExecTG.c
+@@ -42,7 +42,6 @@ int debugCheck (char *debugStr);
+ char *mktemp (char *template);
+ int strncasecmp(const char *s1, const char *s2, size_t n);
+ char *url_encode ();
+-char *svc_value ();
+
+ static time_t currtime, start;
+
+--- a/grid/Pegasus/mConcatFit.c
++++ b/grid/Pegasus/mConcatFit.c
+@@ -29,8 +29,6 @@ extern int optind, opterr;
+
+ extern int getopt(int argc, char *const *argv, const char *options);
+
+-char *svc_val();
+-
+ int checkFile(char *filename);
+
+ int debug;
+--- a/grid/Pegasus/mDAG.c
++++ b/grid/Pegasus/mDAG.c
+@@ -31,8 +31,6 @@ Version Developer Date Change
+
+ #define MAXSTR 1024
+
+-char *svc_value();
+-
+ int readTemplate(char *template);
+ int printError (char *msg);
+ int stradd (char *header, char *card);
+--- a/grid/Pegasus/mDAGGalacticPlane.c
++++ b/grid/Pegasus/mDAGGalacticPlane.c
+@@ -30,8 +30,6 @@ Version Developer Date Change
+
+ #define MAXSTR 1024
+
+-char *svc_value();
+-
+ int readTemplate(char *template);
+ int printError (char *msg);
+ int stradd (char *header, char *card);
+--- a/grid/Pegasus/mDiffFit.c
++++ b/grid/Pegasus/mDiffFit.c
+@@ -20,6 +20,7 @@ Version Developer Date Change
+ #include <sys/stat.h>
+
+ #include <svc.h>
++#include "filePath.h"
+
+ #include "montage.h"
+
+@@ -34,9 +35,6 @@ char cmd [MAXSTR];
+ char msg [MAXSTR];
+ char status [MAXSTR];
+
+-char *svc_value();
+-char *filePath ();
+-
+ extern char *optarg;
+ extern int optind, opterr;
+
+--- a/lib/src/coord/ccalc.c
++++ b/lib/src/coord/ccalc.c
+@@ -15,7 +15,10 @@
+ #define DD2AS(d) (d * 3600.)
+ #define AS2DD(a) (a / 3600.)
+
+-extern void convertCoordinates();
++void
++convertCoordinates(int insys, double inepoch, double inlon, double inlat,
++ int outsys, double outepoch, double *outlon, double *outlat,
++ double obstime);
+
+ static int ExtractEpochInfo(char *from_sys, char *from_epoch, char *to_sys,
+ char *to_epoch, int *jsysin, double *eqx1,
+--- a/lib/src/coord/computeFKCorrections.c
++++ b/lib/src/coord/computeFKCorrections.c
+@@ -14,6 +14,13 @@ static double dad[181], dpmad[181], dd[181], dpmdd[181],
+
+ void initializeFK5CorrectionData();
+ void loadFK5Constants();
++static double interpolateLinear(double y1, double y2,
++ double x1, double x2, double x0);
++static double interpolateBilinear(double za1d1, double za2d1,
++ double za1d2, double za2d2,
++ double a1, double a2,
++ double d1, double d2,
++ double a, double d);
+
+
+ /****************************************************************************/
+@@ -50,8 +57,6 @@ besselianToJulianFKCorrection(double ain, double d, double dmag, double epoch,
+ int loc, loc1, loc2, locx1, locx2;
+ int n1, n3;
+
+- double interpolateLinear(), interpolateBilinear();
+-
+ double dec1, dec2, dtest, fkpdec= 89.999;
+ double xmag1, xmag2, a;
+ double delepk, delras, deldas, delpma, delpmd, dcosd;
+--- a/lib/src/coord/convertBesselianJulian.c
++++ b/lib/src/coord/convertBesselianJulian.c
+@@ -4,13 +4,15 @@
+
+ extern int japply;
+
+-void correctCoordinateRange();
+-void getEquETermCorrection();
+-void getEclETermCorrection();
+-void refinedEquETermCorrection();
+-void refinedEclETermCorrection();
+-void correctForEquatorialETerms();
+-void correctForEclipticETerms();
++void correctCoordinateRange(double *ra, double *dec);
++void getEquETermCorrection(double ra, double dec, double *dra, double *ddec);
++void getEclETermCorrection(double epoch, double elon, double elat,
++ double *dra, double *ddec);
++void refinedEquETermCorrection(double ra, double dec, double *dra, double *ddec);
++void refinedEclETermCorrection(double obsdatej, double elon, double elat,
++ double *delon, double *delat);
++void correctForEquatorialETerms(double date, double *ra, double *dec);
++void correctForEclipticETerms(double date, double *ra, double *dec);
+
+
+
+--- a/lib/src/coord/convertEclEqu.c
++++ b/lib/src/coord/convertEclEqu.c
+@@ -2,7 +2,7 @@
+ #include <math.h>
+ #include <coord.h>
+
+-double computeEquPole();
++double computeEquPole(double date, int besselian);
+
+
+
+--- a/lib/src/coord/coord.h
++++ b/lib/src/coord/coord.h
+@@ -94,31 +94,57 @@ typedef enum {A = 0 , /* 0 */
+
+ /* Prototypes of callable functions */
+
+-void convertCoordinates();
+-void convertEclToEqu();
+-void convertEquToEcl();
+-void convertEquToGal();
+-void convertGalToEqu();
+-void convertGalToSgal();
+-void convertSgalToGal();
+-
+-void convertBesselianToJulian();
+-void convertJulianToBesselian();
+-void precessBesselian();
+-void precessBesselianWithProperMotion();
+-void precessJulian();
+-void precessJulianWithProperMotion();
+-void julianToBesselianFKCorrection();
+-void besselianToJulianFKCorrection();
+-
+-int ccalc();
+-int degreeToDMS();
+-int degreeToHMS();
+-int degreeToSex();
+-int sexToDegree();
+-int parseCoordinateString();
+-
+-double roundValue();
++void
++convertCoordinates(int insys, double inepoch, double inlon, double inlat,
++ int outsys, double outepoch, double *outlon, double *outlat,
++ double obstime);
++void convertEclToEqu(double elon, double elat, double *ra, double *dec,
++ double date, int besselian);
++void convertEquToEcl(double ra, double dec, double *elon, double *elat,
++ double date, int besselian);
++void convertEquToGal(double ra, double dec, double *glon, double *glat);
++void convertGalToEqu(double glon, double glat, double *ra, double *dec);
++void convertGalToSgal(double glon, double glat, double *sglon, double *sglat);
++void convertSgalToGal(double sglon, double sglat, double *glon, double *glat);
++
++void convertBesselianToJulian(double equinoxin, double ra, double dec,
++ double obsdatein, int ieflg,
++ double *raout, double *decout);
++void convertJulianToBesselian(double ra, double dec,
++ double obsdatein, int ieflg, double equinoxout,
++ double *raout, double *decout);
++void precessBesselian(double epochin, double rain, double decin,
++ double epochout, double *raout, double *decout);
++void precessBesselianWithProperMotion
++ (double epochin, double rain, double decin,
++ double epochout, double *raout, double *decout,
++ double pmain, double pmdin, double pin, double vin,
++ double *rapm, double *decpm);
++void precessJulian(double epochin, double rain, double decin,
++ double epochout, double *raout, double *decout);
++void precessJulianWithProperMotion
++ (double epochin, double rain, double decin,
++ double epochout, double *raout, double *decout,
++ double pmain, double pmdin, double pin, double vin,
++ double *rapm, double *decpm);
++void
++julianToBesselianFKCorrection(double ra, double dec, double xmag, double tobs,
++ double *corra, double *corrd, double *corrpa,
++ double *corrpd);
++void
++besselianToJulianFKCorrection(double ain, double d, double dmag, double epoch,
++ double *corra, double *corrd, double *corrpa,
++ double *corrpd);
++
++int ccalc(struct COORD *from, struct COORD *to, char *longprec, char *latprec);
++int degreeToDMS(double deg, int prec, int *neg, int *d, int *m, double *s);
++int degreeToHMS(double deg, int prec, int *neg, int *h, int *m, double *s);
++int degreeToSex(double lon, double lat, char *lonstr, char *latstr);
++int sexToDegree(char *cra, char *cdec, double *ra, double *dec);
++int parseCoordinateString(char *cmd, char *lonstr, char *latstr,
++ char *csys, char *cfmt, char *epoch);
++
++double roundValue(double value, int precision);
+
+
+ #define ISIS_COORD_LIB
+--- a/lib/src/coord/sexToDecimalDegree.c
++++ b/lib/src/coord/sexToDecimalDegree.c
+@@ -7,7 +7,7 @@
+ #define FALSE 0
+ #define TRUE !FALSE
+
+-void getSubstrings();
++void getSubstrings(char *string, char **subst, int *nsub);
+ int checkFormat(char *);
+
+
+--- a/lib/src/svc/svc.h
++++ b/lib/src/svc/svc.h
+@@ -47,7 +47,7 @@ int svc_command(int svc, char *cmdstr);
+ char *svc_value(char *ref);
+ int svc_getargs (char *cmd, char **cmdv);
+ void svc_sigset();
+-void svc_sighandler();
++void svc_sighandler(int sig);
+ SVC *svc_struct(char *instr);
+ char *svc_stripblanks(char *ptr, int len, int quotes);
+ int svc_free(SVC *svc);
+--- a/util/Exec/mExec.c
++++ b/util/Exec/mExec.c
+@@ -33,6 +33,8 @@ Version Developer Date Change
+ #include <math.h>
+ #include <time.h>
+
++#include "filePath.h"
++
+ #define MAXLEN 4096
+ #define BUFSIZE 32769
+ #define MAXHDR 80000
+@@ -51,9 +53,7 @@ char *mktemp (char *template);
+ int debugCheck (char *debugStr);
+
+ char *url_encode ();
+-char *svc_value ();
+ char *keyword_value();
+-char *filePath ();
+ int printerr (char *str);
+ int stradd (char *header, char *card);
+ int FITSerror (char *fname, int status);
diff --git a/sci-astronomy/montage/files/montage-6.1-tcol-cntr.patch b/sci-astronomy/montage/files/montage-6.1-tcol-cntr.patch
new file mode 100644
index 000000000000..c6120ce65343
--- /dev/null
+++ b/sci-astronomy/montage/files/montage-6.1-tcol-cntr.patch
@@ -0,0 +1,22 @@
+From: Ole Streicher <olebole@debian.org>
+Date: Fri, 20 Dec 2024 08:10:53 +0100
+Subject: Fix argument of tcol in mExec.c
+
+Closes: #1089268
+---
+ util/Exec/mExec.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util/Exec/mExec.c b/util/Exec/mExec.c
+index 67cb9b1..1f4ca0d 100644
+--- a/util/Exec/mExec.c
++++ b/util/Exec/mExec.c
+@@ -2409,7 +2409,7 @@ int main(int argc, char **argv, char **envp)
+
+ ncols = topen("pimages.tbl");
+
+- icntr = tcol('cntr');
++ icntr = tcol("cntr");
+
+ if(icntr < 0)
+ {
diff --git a/sci-astronomy/montage/montage-6.1.ebuild b/sci-astronomy/montage/montage-6.1.ebuild
new file mode 100644
index 000000000000..eeacf49c95a8
--- /dev/null
+++ b/sci-astronomy/montage/montage-6.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Toolkit for assembling FITS images into mosaics"
+HOMEPAGE="http://montage.ipac.caltech.edu/"
+SRC_URI="https://github.com/Caltech-IPAC/Montage/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/Montage-${PV}"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+RDEPEND="
+ app-arch/bzip2:=
+ media-libs/freetype:2
+ sci-astronomy/wcstools
+ sci-libs/cfitsio:0=
+ media-libs/libjpeg-turbo:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.1-prototypes.patch
+ "${FILESDIR}"/${PN}-6.1-tcol-cntr.patch
+ "${FILESDIR}"/${PN}-6.1-presentation-strcpy.patch
+ "${FILESDIR}"/${PN}-6.1-montagelib-dep.patch
+)
+
+src_prepare() {
+ default
+
+ sed -e '/cfitsio/d' \
+ -e '/wcssubs/d' \
+ -e '/jpeg/d' \
+ -e '/freetype/d' \
+ -e '/bzip2/d' \
+ -i lib/src/Makefile MontageLib/Makefile || die
+
+ tc-export CC AR
+
+ # bug #708396
+ append-cflags -fcommon
+
+ find . -type f -name Makefile\* -execdir sed -i \
+ -e "/^CC.*=/s#\(gcc\|cc\)#$(tc-getCC)#g" \
+ -e "/^CFLAGS.*=/s#-g#${CFLAGS} $($(tc-getPKG_CONFIG) --cflags wcstools)#g" \
+ -e "s#-I../../lib/freetype/include #$($(tc-getPKG_CONFIG) --cflags freetype2)#g" \
+ -e 's#$(CC) -o#$(CC) $(LDFLAGS) -o#g' \
+ -e 's#$(CC) -g -o#$(CC) $(LDFLAGS) -o#g' \
+ -e "s#-lwcs#$($(tc-getPKG_CONFIG) --libs wcstools)#g" \
+ -e "s#-lcfitsio#$($(tc-getPKG_CONFIG) --libs cfitsio)#g" \
+ -e 's#-lnsl##g' \
+ -e "s#\tar #\t$(tc-getAR) #g" \
+ -e "s#ranlib #$(tc-getRANLIB) #g" \
+ -e "s#\tgcc -shared#\t$(tc-getCC) \$(LDFLAGS) -shared#g" \
+ -e "s#\tgcc -std=gnu99 -o#\t$(tc-getCC) \$(LDFLAGS) -o#g" \
+ -e "s#\tgcc -std=gnu99 -g -O2#\t$(tc-getCC) \$(CFLAGS)#g" \
+ '{}' + || die
+}
+
+src_install() {
+ dobin bin/*
+ dodoc README* ChangeHistory
+ use doc && dodoc -r man/*
+}