-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalienfile
109 lines (94 loc) · 2.53 KB
/
alienfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
use alienfile;
use Env qw(@CMAKE_INCLUDE_PATH @CMAKE_LIBRARY_PATH);
use DynaLoader ();
use File::Basename qw(dirname);
use File::Spec;
use Config;
plugin PkgConfig => 'plplot';
share {
requires 'File::Which';
# NOTE currently only pulling PLplot 5.15.0
start_url 'https://sourceforge.net/projects/plplot/files/plplot/5.15.0%20Source/';
plugin 'Decode::SourceForge';
plugin Download => (
filter => qr/^plplot-.*\.tar\.gz$/,
version => qr/([0-9\.]+)/,
);
plugin Extract => 'tar.gz';
plugin 'Build::CMake';
# Driver: png,jpeg,gif : formats via libgd
# NOTE This is currently listed as a deprecated driver in the PLplot
# documentation.
my $pld_gd_enable = 1;
my $pld_gd_gdnames = '';
# Driver: wingcc : interactive plotting device for MSWin32
my $pld_wingcc_enable = $^O eq 'MSWin32';
if( $^O eq 'MSWin32' && $Config{myuname} =~ /^Win32 strawberry-perl/ ) {
# This helps to find the paths under Strawberry Perl.
my ($gd_lib_file) = DynaLoader::dl_findfile('-lgd');
if( $gd_lib_file ) {
# libgd paths (for PLD_{png,jpeg,gif})
$pld_gd_gdnames = 'gd';
my $c_lib_dir = dirname($gd_lib_file);
my $c_dir = dirname($c_lib_dir);
my $c_inc_dir = File::Spec->catfile( $c_dir, 'include' );
# gdi32 paths (for PLD_wingcc)
my $arch = 'x86_64-w64-mingw32';
my $arch_lib_dir = File::Spec->catfile( $c_dir, $arch, 'lib' );
my $arch_inc_dir = File::Spec->catfile( $c_dir, $arch, 'include' );
push @CMAKE_LIBRARY_PATH, $c_lib_dir, $arch_lib_dir;
push @CMAKE_INCLUDE_PATH, $c_inc_dir, $arch_inc_dir;
}
}
build [
[ '%{cmake}', qw(
-DENABLE_ada=OFF
-DENABLE_cxx=OFF
-DENABLE_d=OFF
-DENABLE_fortran=OFF
-DENABLE_java=OFF
-DENABLE_lua=OFF
-DENABLE_ocaml=OFF
-DENABLE_octave=OFF
-DENABLE_python=OFF
-DENABLE_qt=OFF
-DENABLE_pyqt4=OFF
-DENABLE_tcl=OFF
-DENABLE_itcl=OFF
-DENABLE_tk=OFF
-DENABLE_itk=OFF
-DENABLE_wxwidgets=OFF
-DPLPLOT_USE_QT5=OFF
-DPL_DOUBLE=ON
),
( $^O eq 'MSWin32'
? ( '-DPKG_CONFIG_EXECUTABLE=' . File::Which::which('pkg-config'), )
: ()
),
( $pld_wingcc_enable
? qw(-DPLD_wingcc=ON)
: ()
),
( $pld_gd_enable
? (
qw(-DPLD_png=ON -DPLD_jpeg=ON -DPLD_gif=ON),
( $pld_gd_gdnames
? ( "-DGD_NAMES=$pld_gd_gdnames" )
: ()
)
)
: ()
),
qw(
-DBUILD_SHARED_LIBS=OFF
),
( grep { $_ !~ /\Q-DCMAKE_INSTALL_LIBDIR:PATH=\E/ }
@{ meta->prop->{plugin_build_cmake}->{args} },
),
'%{.install.extract}'
],
'%{make}',
'%{make} install',
];
plugin 'Gather::IsolateDynamic';
}