forked from pool/pythia
* Minor rebase of all patches for update. * Major rebase of pythia-examples-link-gmp.patch to apply against updated make file. * Revise disabled tests for %check. OBS-URL: https://build.opensuse.org/package/show/science/pythia?expand=0&rev=63
138 lines
5.8 KiB
Diff
138 lines
5.8 KiB
Diff
---
|
|
Makefile | 10 +++++++++-
|
|
configure | 5 ++++-
|
|
examples/Makefile | 2 +-
|
|
plugins/mg5mes/Makefile | 6 +++++-
|
|
plugins/python/Makefile | 12 +++++++++++-
|
|
5 files changed, 30 insertions(+), 5 deletions(-)
|
|
|
|
Index: pythia8313/Makefile
|
|
===================================================================
|
|
--- pythia8313.orig/Makefile
|
|
+++ pythia8313/Makefile
|
|
@@ -36,7 +36,11 @@ LOCAL_TMP=tmp
|
|
LOCAL_MKDIRS:=$(shell mkdir -p $(LOCAL_TMP) $(LOCAL_LIB))
|
|
CXX_COMMON:=-I$(LOCAL_INCLUDE) $(CXX_COMMON)
|
|
OBJ_COMMON:=-MD $(CXX_COMMON) $(OBJ_COMMON)
|
|
-LIB_COMMON=-Wl,-rpath,../lib:$(PREFIX_LIB) -ldl $(GZIP_LIB)
|
|
+ifneq ($(DISABLE_RPATH),true)
|
|
+ LIB_COMMON=-Wl,-rpath,$(PREFIX_LIB) -ldl $(GZIP_LIB)
|
|
+else
|
|
+ LIB_COMMON=-ldl $(GZIP_LIB)
|
|
+endif
|
|
|
|
# PYTHIA.
|
|
OBJECTS=$(patsubst $(LOCAL_SRC)/%.cc,$(LOCAL_TMP)/%.o,\
|
|
@@ -125,7 +129,11 @@ $(LOCAL_LIB)/libpythia8powheg%.so: $(POW
|
|
$(LOCAL_TMP)/LHAPowheg.o $(LOCAL_LIB)/libpythia8$(LIB_SUFFIX)
|
|
$(CXX) $(LOCAL_TMP)/LHAPowheg.o -o $@ $(CXX_COMMON) $(CXX_SHARED)\
|
|
$(CXX_SONAME)$(notdir $@) -Llib -lpythia8\
|
|
+ifneq ($(DISABLE_RPATH),true)
|
|
-Wl,-rpath,../lib:$(POWHEG_DIR) -L$(POWHEG_DIR) -l$*
|
|
+else
|
|
+ -L$(POWHEG_DIR) -l$*
|
|
+endif
|
|
$(LOCAL_LIB)/libpythia8powhegHooks.so: $(LOCAL_TMP)/PowhegHooks.o\
|
|
$(LOCAL_LIB)/libpythia8$(LIB_SUFFIX)
|
|
$(CXX) $< -o $@ $(CXX_COMMON) $(CXX_SHARED) $(CXX_SONAME)$(notdir $@)\
|
|
Index: pythia8313/configure
|
|
===================================================================
|
|
--- pythia8313.orig/configure
|
|
+++ pythia8313/configure
|
|
@@ -30,6 +30,7 @@ Configuration options.
|
|
--help : Print this help message (also -h, --h, and -help).
|
|
--enable-debug : Turn on debugging and disable optimization.
|
|
--enable-optdebug : Turn on debugging but allow optimization.
|
|
+--disable-rpath : Disable use of rpath for linking.
|
|
--lcg=PLATFORM : Specify the LCG platform to use when the
|
|
--with-PACKAGE-version option, described below,
|
|
is set for a given optional package
|
|
@@ -96,7 +97,7 @@ Advanced options.
|
|
--obj-common='FLAGS' : Set the common C++ flags used for object (.o) compilation
|
|
only (not linking).
|
|
BLOCKTEXT
|
|
-OPTIONS="-h --h -help --help --enable-debug --enable-optdebug --lcg --lcg-ver"
|
|
+OPTIONS="-h --h -help --help --enable-debug --enable-optdebug --disable-rpath --lcg --lcg-ver"
|
|
OPTIONS+=" --prefix --prefix-bin --prefix-lib --prefix-include --prefix-share"
|
|
for PKG in "evtgen" "fastjet3" "hepmc2" "hepmc3" "lhapdf5" "lhapdf6" "powheg"\
|
|
"rivet" "yoda" "root" "gzip" "python" "mg5mes" "openmp" "mpich" "hdf5"\
|
|
@@ -321,6 +322,7 @@ done
|
|
# Set the compilation flags and options (order matters).
|
|
[ "$ENABLE_DEBUG_SET" = true ] && ENABLE_DEBUG="-g " || ENABLE_DEBUG="-O2 "
|
|
[ "$ENABLE_OPTDEBUG_SET" = true ] && ENABLE_DEBUG="-g -O "
|
|
+[ "$DISABLE_RPATH_SET" = true ] && DISABLE_RPATH="true" || DISABLE_RPATH="false"
|
|
if [ -z "$ARCH" ]; then ARCH=$(uname | grep -i -o -e Linux -e Darwin); fi
|
|
ARCH=$(echo $ARCH | awk '{print toupper($0)}')
|
|
if [ "$ARCH" != "LINUX" ] && [ "$ARCH" != "DARWIN" ]; then
|
|
@@ -464,6 +466,7 @@ PREFIX_LIB=$PREFIX_LIB
|
|
PREFIX_SHARE=$PREFIX_SHARE
|
|
|
|
# Compilation flags (see ./configure --help for further documentation).
|
|
+DISABLE_RPATH=$DISABLE_RPATH
|
|
CXX=$CXX
|
|
CXX_DTAGS=$CXX_DTAGS
|
|
CXX_COMMON=$CXX_COMMON
|
|
Index: pythia8313/plugins/mg5mes/Makefile
|
|
===================================================================
|
|
--- pythia8313.orig/plugins/mg5mes/Makefile
|
|
+++ pythia8313/plugins/mg5mes/Makefile
|
|
@@ -28,7 +28,11 @@ LOCAL_DIRS:=$(subst $(LOCAL_TMP)/,,$(wil
|
|
LOCAL_MKDIRS:=$(shell mkdir -p $(LOCAL_TMP) $(TOP_LIB))
|
|
LOCAL_MKDIRS:=$(foreach DIR,$(LOCAL_DIRS),$(shell mkdir -p $(LOCAL_TMP)/$(DIR)))
|
|
OBJ_COMMON=-MD -DPYTHIA8 $(CXX_COMMON) -I$(TOP_INCLUDE) -w -fpermissive
|
|
-LIB_COMMON=-Wl,-rpath,$(TOP_LIB) -ldl $(GZIP_LIB) -Wl,-undefined,dynamic_lookup
|
|
+ifneq ($(DISABLE_RPATH),true)
|
|
+ LIB_COMMON=-Wl,-rpath,$(TOP_LIB) -ldl $(GZIP_LIB) -Wl,-undefined,dynamic_lookup
|
|
+else
|
|
+ LIB_COMMON=-ldl $(GZIP_LIB) -Wl,-undefined,dynamic_lookup
|
|
+endif
|
|
PYTHIA=$(TOP_LIB)/libpythia8$(LIB_SUFFIX)
|
|
|
|
# Set the wrapper, determine the objects and targets.
|
|
Index: pythia8313/plugins/python/Makefile
|
|
===================================================================
|
|
--- pythia8313.orig/plugins/python/Makefile
|
|
+++ pythia8313/plugins/python/Makefile
|
|
@@ -27,7 +27,11 @@ LOCAL_TMP=tmp
|
|
LOCAL_INCLUDE=include
|
|
LOCAL_MKDIRS:=$(shell mkdir -p $(LOCAL_TMP) $(TOP_LIB))
|
|
OBJ_COMMON=-MD $(CXX_COMMON) -Iinclude $(PYTHON_INCLUDE) -w -fpermissive
|
|
-LIB_COMMON=-Wl,-rpath,$(TOP_LIB) -ldl $(GZIP_LIB)
|
|
+ifneq ($(DISABLE_RPATH),true)
|
|
+ LIB_COMMON=-Wl,-rpath,$(TOP_LIB) -ldl $(GZIP_LIB)
|
|
+else
|
|
+ LIB_COMMON=-ldl $(GZIP_LIB)
|
|
+endif
|
|
PYTHIA=$(TOP_LIB)/libpythia8$(LIB_SUFFIX)
|
|
|
|
# Determine the headers.
|
|
@@ -76,9 +80,15 @@ $(LOCAL_TMP)/%.o: $(LOCAL_SRC)/%.cpp $(L
|
|
|
|
# Build the library.
|
|
$(TOP_LIB)/pythia8.so: $(PYTHIA) $(HEADERS) $(OBJECTS)
|
|
+ifneq ($(DISABLE_RPATH),true)
|
|
$(CXX) $(OBJECTS) -o $@ $(CXX_COMMON) $(CXX_SHARED)\
|
|
$(CXX_SONAME)$(notdir $@) $(LIB_COMMON) -L$(TOP_LIB)\
|
|
-Wl,-rpath,$(PREFIX_LIB) -lpythia8 -Wl,-undefined,dynamic_lookup
|
|
+else
|
|
+ $(CXX) $(OBJECTS) -o $@ $(CXX_COMMON) $(CXX_SHARED)\
|
|
+ $(CXX_SONAME)$(notdir $@) $(LIB_COMMON) -L$(TOP_LIB)\
|
|
+ -lpythia8 -Wl,-undefined,dynamic_lookup
|
|
+endif
|
|
|
|
# Clean.
|
|
clean:
|
|
Index: pythia8313/examples/Makefile
|
|
===================================================================
|
|
--- pythia8313.orig/examples/Makefile
|
|
+++ pythia8313/examples/Makefile
|
|
@@ -26,7 +26,7 @@ ifneq ("$(wildcard ../lib/libpythia8.*)"
|
|
PREFIX_INCLUDE=../include
|
|
endif
|
|
CXX_COMMON:=$(OBJ_COMMON) -I$(PREFIX_INCLUDE) $(CXX_COMMON) $(GZIP_LIB)
|
|
-CXX_COMMON+= -L$(PREFIX_LIB) -Wl,-rpath,$(PREFIX_LIB) -lpythia8 -ldl
|
|
+CXX_COMMON+= -L$(PREFIX_LIB) -lpythia8 -ldl
|
|
PYTHIA=$(PREFIX_LIB)/libpythia8$(LIB_SUFFIX)
|
|
|
|
# Define RIVET options and fix C++ version, rpath, missing HDF5.
|