You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
2.3 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../exact-image/exact-image-0.8.7-perl-install.patch
# Copyright (C) 2012 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Description: Install perl modules into correct locations
It is common practise that architecture-dependent and architecture-independent
files are installed in different locations.
Besides that we are using the 'vendor_perl' directories because, according to
http://search.cpan.org/dist/perl/INSTALL#Installation_Directories this is the
right place for distributions which build binary packages of perl add-on
modules.
--- exact-image-0.8.7/api/perl/Makefile.orig 2008-12-09 10:42:19.000000000 +0100
+++ exact-image-0.8.7/api/perl/Makefile 2012-08-01 15:23:13.317027601 +0200
@@ -4,6 +4,13 @@
BINARY_EXT = $(X_DYNEXT)
DEPS = $(lib_BINARY) $(bardecode_BINARY) $(codecs_BINARY) $(api_BINARY) $($(X_MODULE)_OUTPUT)/api-perl-wrap.cc
+# perl interpreter
+PERL := /usr/bin/perl
+# Directory to install architecture-dependent perl files into
+PERL_ARCH := $(shell $(PERL) -MConfig -e 'print $$Config{installvendorarch}')
+# Directory to install architecture-independent perl files into
+PERL_LIB := $(shell $(PERL) -MConfig -e 'print $$Config{installvendorlib}')
+
objdir/api/perl/CXXFLAGS := -I api $(PERLINCS)
$($(X_MODULE)_OUTPUT)/api-perl-wrap.cc: $(X_MODULE)/../api.hh $(X_MODULE)/../api-swig.hh
@@ -20,5 +27,7 @@
all:: $($(X_MODULE)_BINARY)
install:: $($(X_MODULE)_BINARY)
$(Q)echo "INSTALL PERL module $^"
- $(Q)mkdir -p $(DESTDIR)$(libdir)/perl5/site_perl/
- $(Q)install $^ $(dir $^)/ExactImage.pm $(DESTDIR)$(libdir)/perl5/site_perl/
+ $(Q)mkdir -p $(DESTDIR)$(PERL_ARCH)
+ $(Q)install $^ $(DESTDIR)$(PERL_ARCH)/
+ $(Q)mkdir -p $(DESTDIR)$(PERL_LIB)
+ $(Q)install $(dir $^)/ExactImage.pm $(DESTDIR)$(PERL_LIB)/