summaryrefslogtreecommitdiff
path: root/editors/p5-Wx-Scintilla/patches/patch-aa
blob: 5e8f8bd1b5fcd7e07f6b952f1cc95e54f3721cac (plain)
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
$NetBSD: patch-aa,v 1.3 2015/04/17 15:22:44 joerg Exp $

- Don't use $ORIGIN, it violates pkgsrc policy.
- Obtain additional linker flags to not depend on implicit ${PREFIX}/lib.

--- inc/Module/Build/Scintilla/GTK.pm.orig	2012-09-04 10:20:47.000000000 +0000
+++ inc/Module/Build/Scintilla/GTK.pm
@@ -86,7 +86,7 @@ sub stc_extra_scintilla_libs {
 	my $extras = '-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 ';
 	$extras .= '-lgdk_pixbuf-2.0 -lm -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 ';
 	$extras .= '-lgmodule-2.0 -lgthread-2.0 -lglib-2.0';
-	return $extras;
+	return Alien::wxWidgets->libraries(qw(core base)) . ' ' . $extras;
 }
 
 sub stc_link_scintilla_objects {
@@ -95,8 +95,7 @@ sub stc_link_scintilla_objects {
 	my @cmd = (
 		$self->stc_linker,
 		$self->stc_ldflags,
-		'-fPIC -shared',
-		' -o ' . $shared_lib,
+		$shared_lib,
 		join( ' ', @$objects ),
 		$self->stc_link_paths,
 		$self->stc_extra_scintilla_libs,
@@ -139,14 +138,14 @@ sub stc_link_xs {
 	my @cmd = (
 		Alien::wxWidgets->linker,
 		Alien::wxWidgets->link_flags,
+		'-o', $dll,
 		$Config{lddlflags},
 		'-fPIC -L.',
-		'-s -o ' . $dll,
 		'Scintilla.o',
 		'-Lblib/arch/auto/Wx/Scintilla ' . $self->stc_scintilla_link,
 		Alien::wxWidgets->libraries(qw(core base)),
 		$Config{perllibs},
-		"-Wl,-rpath,'\$ORIGIN'",
+		"-Wl,-rpath,'" . File::Spec->catdir( $Config{vendorarch}, "auto/Wx/Scintilla" ) . "'",
 	);
 
 	$self->_run_command( \@cmd );