tree-wide: make python path variables relative
This commit is contained in:
parent
844a3cd746
commit
3318e17163
12
Manual.md
12
Manual.md
|
@ -1475,13 +1475,13 @@ Also, a set of useful variables are defined to use in the templates:
|
|||
| Variable | Value |
|
||||
|-------------|----------------------------------|
|
||||
| py2_ver | 2.X |
|
||||
| py2_lib | /usr/lib/python2.X |
|
||||
| py2_sitelib | /usr/lib/python2.X/site-packages |
|
||||
| py2_inc | /usr/include/python2.X |
|
||||
| py2_lib | usr/lib/python2.X |
|
||||
| py2_sitelib | usr/lib/python2.X/site-packages |
|
||||
| py2_inc | usr/include/python2.X |
|
||||
| py3_ver | 3.X |
|
||||
| py3_lib | /usr/lib/python3.X |
|
||||
| py3_sitelib | /usr/lib/python3.X/site-packages |
|
||||
| py3_inc | /usr/include/python3.Xm |
|
||||
| py3_lib | usr/lib/python3.X |
|
||||
| py3_sitelib | usr/lib/python3.X/site-packages |
|
||||
| py3_inc | usr/include/python3.Xm |
|
||||
|
||||
> NOTE: it's expected that additional subpkgs must be generated to allow packaging for multiple
|
||||
python versions.
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
#
|
||||
|
||||
py2_ver="2.7"
|
||||
py2_lib="/usr/lib/python${py2_ver}"
|
||||
py2_lib="usr/lib/python${py2_ver}"
|
||||
py2_sitelib="${py2_lib}/site-packages"
|
||||
py2_inc="/usr/include/python${py2_ver}"
|
||||
py2_inc="usr/include/python${py2_ver}"
|
||||
|
||||
py3_ver="3.8"
|
||||
py3_abiver=""
|
||||
py3_lib="/usr/lib/python${py3_ver}"
|
||||
py3_lib="usr/lib/python${py3_ver}"
|
||||
py3_sitelib="${py3_lib}/site-packages"
|
||||
py3_inc="/usr/include/python${py3_ver}${py3_abiver}"
|
||||
py3_inc="usr/include/python${py3_ver}${py3_abiver}"
|
||||
|
|
|
@ -29,7 +29,7 @@ fi
|
|||
post_install() {
|
||||
vmkdir usr/share/applications
|
||||
vmkdir usr/share/pixmaps
|
||||
ln -s "${py3_sitelib}/bCNC/bCNC.desktop" "${DESTDIR}/usr/share/applications/"
|
||||
ln -s "${py3_sitelib}/bCNC/bCNC.png" "${DESTDIR}/usr/share/pixmaps/"
|
||||
ln -s "/${py3_sitelib}/bCNC/bCNC.desktop" "${DESTDIR}/usr/share/applications/"
|
||||
ln -s "/${py3_sitelib}/bCNC/bCNC.png" "${DESTDIR}/usr/share/pixmaps/"
|
||||
ln -s "bCNC" "${DESTDIR}/usr/bin/bcnc"
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ configure_args="
|
|||
-DPYTHON_VERSION=$py3_ver
|
||||
-DPYTHON_LIBPATH=/usr/lib
|
||||
-DPYTHON_LIBRARY='python${py3_ver}${py3_abiver}'
|
||||
-DPYTHON_INCLUDE_DIRS=$py3_inc"
|
||||
-DPYTHON_INCLUDE_DIRS=/$py3_inc"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) # crashes at startup in jemallocs free()
|
||||
|
|
|
@ -71,7 +71,7 @@ do_build() {
|
|||
cat > user-config.jam <<-__EOF
|
||||
using gcc : : ${CXX} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
|
||||
using python : 2.7 : ${XBPS_CROSS_BASE}/usr/bin/python2 : ${XBPS_CROSS_BASE}/usr/include/python2.7 : ${XBPS_CROSS_BASE}/usr/lib/python2.7 ;
|
||||
using python : ${py3_ver} : ${XBPS_CROSS_BASE}/usr/bin/python3 : ${XBPS_CROSS_BASE}${py3_inc} : ${XBPS_CROSS_BASE}${py3_lib} ;
|
||||
using python : ${py3_ver} : ${XBPS_CROSS_BASE}/usr/bin/python3 : ${XBPS_CROSS_BASE}/${py3_inc} : ${XBPS_CROSS_BASE}/${py3_lib} ;
|
||||
|
||||
__EOF
|
||||
# --no-cmake-config should be removed with boost-1.71 or later
|
||||
|
|
|
@ -19,6 +19,6 @@ pre_configure() {
|
|||
NOCONFIGURE=1 ./autogen.sh
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
sed -i "s,PYTHON_INCLUDES=.*,PYTHON_INCLUDES=-I${XBPS_CROSS_BASE}${py3_inc},g" configure
|
||||
sed -i "s,PYTHON_INCLUDES=.*,PYTHON_INCLUDES=-I${XBPS_CROSS_BASE}/${py3_inc},g" configure
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ version=3.8.0.0
|
|||
revision=4
|
||||
build_style=cmake
|
||||
conf_files="/etc/gnuradio/conf.d/*"
|
||||
configure_args="-DENABLE_INTERNAL_VOLK=OFF -DGR_PYTHON_DIR=${py3_sitelib}"
|
||||
configure_args="-DENABLE_INTERNAL_VOLK=OFF -DGR_PYTHON_DIR=/${py3_sitelib}"
|
||||
hostmakedepends="pkg-config doxygen swig python3-Mako python3-Sphinx
|
||||
python3-cairo python3-numpy python3-yaml"
|
||||
makedepends="SDL-devel boost-devel fftw-devel gsl-devel jack-devel
|
||||
|
|
|
@ -15,5 +15,5 @@ distfiles="https://github.com/gramps-project/${pkgname}/archive/v${version}.tar.
|
|||
checksum=4f11d7fa66e397a36c902057794c48c0740d56c802fcdc5f2c3e3652104dd45b
|
||||
|
||||
post_install() {
|
||||
echo -n '/usr/share' > ${DESTDIR}${py3_sitelib}/gramps/gen/utils/resource-path
|
||||
echo -n '/usr/share' > ${DESTDIR}/${py3_sitelib}/gramps/gen/utils/resource-path
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ CXXFLAGS="-std=c++17"
|
|||
if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" python wxPython"
|
||||
configure_args+=" -DPYTHON_SITE_PACKAGE_PATH=${XBPS_CROSS_BASE}/${py2_sitelib}
|
||||
-DPYTHON_DEST=${py2_sitelib}"
|
||||
-DPYTHON_DEST=/${py2_sitelib}"
|
||||
fi
|
||||
|
||||
pre_configure() {
|
||||
|
|
|
@ -44,7 +44,7 @@ python3-libcec_package() {
|
|||
depends="python3 libcec>=${version}"
|
||||
|
||||
pkg_install() {
|
||||
vmove "${py3_lib#/}"
|
||||
vmove "${py3_lib}"
|
||||
}
|
||||
}
|
||||
libcec-devel_package() {
|
||||
|
|
|
@ -6,7 +6,7 @@ build_style=scons
|
|||
make_build_args="PREFIX=/usr MANDIR=/usr/share/man
|
||||
UDEVDIR=/usr/lib/udev/rules.d CUSTOM_ENV=1 BUILD_TESTS=0
|
||||
ENABLE_OPTIMIZATIONS=0 DEBUG=0 PYTHON_INTERPRETER=/usr/bin/python3
|
||||
DETECT_USERSPACE_ENV=0 PYPKGDIR=${py3_sitelib}"
|
||||
DETECT_USERSPACE_ENV=0 PYPKGDIR=/${py3_sitelib}"
|
||||
make_install_args="$make_build_args WILL_DEAL_WITH_XDG_MYSELF=1"
|
||||
hostmakedepends="pkg-config xdg-utils python3-PyQt5-devel-tools"
|
||||
makedepends="libxml++-devel libdbus-c++-devel libsigc++-devel libconfig++-devel
|
||||
|
|
|
@ -5,8 +5,8 @@ revision=3
|
|||
build_style=cmake
|
||||
configure_args="-DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_OPENMP=ON
|
||||
-DWITH_OPENCL=ON -DENABLE_CXX11=ON -DOPENCV_SKIP_PYTHON_LOADER=ON
|
||||
-DOPENCV_PYTHON3_INSTALL_PATH=${py3_sitelib}
|
||||
-DOPENCV_PYTHON_INSTALL_PATH=${py2_sitelib}"
|
||||
-DOPENCV_PYTHON3_INSTALL_PATH=/${py3_sitelib}
|
||||
-DOPENCV_PYTHON_INSTALL_PATH=/${py2_sitelib}"
|
||||
hostmakedepends="pkg-config eigen"
|
||||
makedepends="ffmpeg-devel libpng-devel libjpeg-turbo-devel tiff-devel
|
||||
jasper-devel ocl-icd-devel libgomp-devel libopenexr-devel gtk+3-devel
|
||||
|
|
|
@ -7,8 +7,8 @@ build_style=cmake
|
|||
configure_args="-DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_OPENMP=ON -DWITH_OPENCL=ON
|
||||
-DOPENCV_GENERATE_PKGCONFIG=YES
|
||||
-DWITH_EIGEN=ON -DENABLE_CXX11=ON -DOPENCV_SKIP_PYTHON_LOADER=ON
|
||||
-DOPENCV_PYTHON3_INSTALL_PATH=${py3_sitelib}
|
||||
-DOPENCV_PYTHON_INSTALL_PATH=${py2_sitelib}
|
||||
-DOPENCV_PYTHON3_INSTALL_PATH=/${py3_sitelib}
|
||||
-DOPENCV_PYTHON_INSTALL_PATH=/${py2_sitelib}
|
||||
-DOPENCV_EXTRA_MODULES_PATH=${XBPS_BUILDDIR}/opencv_contrib-${version}/modules
|
||||
-DBUILD_opencv_rgbd=OFF"
|
||||
hostmakedepends="pkg-config eigen"
|
||||
|
|
|
@ -19,7 +19,7 @@ checksum=ddef45f9601cd12042edfc9b6e37efcca32814e1e0f4bb8682d08144a3e2d230
|
|||
python_version=2 #unverified
|
||||
conflicts="rpmextract>=0" # Both provide rpm2cpio
|
||||
|
||||
CFLAGS="-I${XBPS_CROSS_BASE}${py3_inc}"
|
||||
CFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
|
||||
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/nss"
|
||||
CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/nspr"
|
||||
|
||||
|
|
Loading…
Reference in New Issue