mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
Add patches to fix build failures when using clang, when using the latest version of scons, when scons is using python 3, and to prevent the creation of the unwanted file gmtl-0.6.1.tar.gz and to install the file gmtl.pc. Add runtime dependencies on flagpoll and python which are used by gmtl-config. flagpoll is currently incompatible with python 3 and uses python27 so use the same python here to reduce the number of pythons a user needs to install. Specify absolute path to scons. Specify prefix at build time so that build output does not give the erroneous impression that files will be installed in /usr/local. Specify empty directories for Boost and CppUnit at build time so that any Boost or CppUnit that might be installed in /usr/local is not inadvertently used. No need to specify destroot.cmd or destroot.target; the defaults work. Add modeline. Modernize checksums. Set platforms to any and set supported_archs to noarch because this port doesn't install anything architecture- or OS-specific. Add GitHub handle to maintainers line. Install documentation files. Indicate license. The software claims to be licensed LGPL-2.1+ but there is also a license addendum that imposes additional restrictions and the LGPL does not permit the imposition of additional restrictions. Rewrite master_sites to avoid redirects. Closes: https://trac.macports.org/ticket/57421
65 lines
2.7 KiB
Diff
65 lines
2.7 KiB
Diff
Install gmtl.pc.
|
|
https://sourceforge.net/p/ggt/code/1264
|
|
|
|
Because gmtl*.fpc and gmtl.pc get built at install time, not at build time, and
|
|
because at install time we have to use prefix=${destroot}${prefix} because this
|
|
build system doesn't support DESTDIR, gmtl*.fpc and gmtl.pc contain the path to
|
|
the destroot, which we have to remove in a post-destroot block in the Portfile.
|
|
--- SConstruct.orig
|
|
+++ SConstruct
|
|
@@ -701,14 +701,15 @@
|
|
base_inst_paths['lib'] = pj(base_inst_paths['base'], 'lib')
|
|
base_inst_paths['share'] = pj(base_inst_paths['base'], 'share')
|
|
base_inst_paths['flagpoll'] = pj(base_inst_paths['share'], 'flagpoll')
|
|
+ base_inst_paths['pkgconfig'] = pj(base_inst_paths['lib'], 'pkgconfig')
|
|
base_inst_paths['bin'] = pj(base_inst_paths['base'], 'bin')
|
|
include_dir = pj(base_inst_paths['base'], 'include')
|
|
- base_inst_paths['include'] = pj('${fp_file_cwd}' ,'..' ,'..', 'include')
|
|
+ base_inst_paths['include'] = pj(base_inst_paths['base'], 'include')
|
|
|
|
if baseEnv['versioning'] == 'yes' and not sys.platform.startswith("win"):
|
|
include_version = "gmtl-%s.%s.%s" % GetGMTLVersion()
|
|
include_dir = pj(include_dir, include_version)
|
|
- base_inst_paths['include'] = pj('${fp_file_cwd}' ,'..' ,'..', 'include',
|
|
+ base_inst_paths['include'] = pj(base_inst_paths['base'], 'include',
|
|
include_version)
|
|
|
|
print "using prefix:", base_inst_paths['base']
|
|
@@ -743,7 +744,7 @@
|
|
# Build up substitution map
|
|
submap = {
|
|
'@provides@' : provides,
|
|
- '@prefix@' : pj('${fp_file_cwd}', '..', '..'),
|
|
+ '@prefix@' : base_inst_paths['base'],
|
|
'@exec_prefix@' : '${prefix}',
|
|
'@gmtl_cxxflags@' : '',
|
|
'@includedir@' : base_inst_paths['include'],
|
|
@@ -760,9 +761,14 @@
|
|
'gmtl.fpc.in', submap = submap)
|
|
env.AddPostAction(gmtl_fpc, Chmod('$TARGET', 0644))
|
|
env.Depends(gmtl_fpc, 'gmtl/Version.h')
|
|
+ gmtl_pc = env.SubstBuilder(pj(base_inst_paths['pkgconfig'], "gmtl.pc"),
|
|
+ 'gmtl.fpc.in', submap = submap)
|
|
+ env.AddPostAction(gmtl_pc, Chmod('$TARGET', 0o644))
|
|
+ env.Depends(gmtl_pc, 'gmtl/Version.h')
|
|
|
|
installed_targets += env.Install(base_inst_paths['bin'], 'gmtl-config')
|
|
installed_targets += gmtl_fpc
|
|
+ installed_targets += gmtl_pc
|
|
|
|
pkg.build()
|
|
installed_targets += pkg.getInstalledTargets()
|
|
--- gmtl.fpc.in.orig
|
|
+++ gmtl.fpc.in
|
|
@@ -1,3 +1,4 @@
|
|
+prefix=@prefix@
|
|
exec_prefix=@exec_prefix@
|
|
cxxflags=@gmtl_cxxflags@
|
|
includedir=@includedir@
|
|
@@ -11,4 +12,4 @@
|
|
Libs:
|
|
Cflags: -I${includedir}
|
|
Arch: @arch@
|
|
-prefix: @prefix@
|
|
+prefix: ${prefix}
|