diff --git a/Manual.md b/Manual.md index da8764c78e6..c612479ec73 100644 --- a/Manual.md +++ b/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. diff --git a/common/environment/setup/python.sh b/common/environment/setup/python.sh index eca368dbf0d..3469fe070a9 100644 --- a/common/environment/setup/python.sh +++ b/common/environment/setup/python.sh @@ -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}" diff --git a/srcpkgs/bcnc/template b/srcpkgs/bcnc/template index df8a16d12cf..c7e6eb32c80 100644 --- a/srcpkgs/bcnc/template +++ b/srcpkgs/bcnc/template @@ -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" } diff --git a/srcpkgs/blender/template b/srcpkgs/blender/template index 663a38381b6..754af3f0c47 100644 --- a/srcpkgs/blender/template +++ b/srcpkgs/blender/template @@ -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() diff --git a/srcpkgs/boost/template b/srcpkgs/boost/template index 3dffb6087ca..f0827218312 100644 --- a/srcpkgs/boost/template +++ b/srcpkgs/boost/template @@ -71,7 +71,7 @@ do_build() { cat > user-config.jam <<-__EOF using gcc : : ${CXX} : "${CXXFLAGS}" "${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 diff --git a/srcpkgs/compizconfig-python/template b/srcpkgs/compizconfig-python/template index c3bd82bd18b..437f1876301 100644 --- a/srcpkgs/compizconfig-python/template +++ b/srcpkgs/compizconfig-python/template @@ -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 } diff --git a/srcpkgs/gnuradio/template b/srcpkgs/gnuradio/template index 925990ba141..8c7c6e80eee 100644 --- a/srcpkgs/gnuradio/template +++ b/srcpkgs/gnuradio/template @@ -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 diff --git a/srcpkgs/gramps/template b/srcpkgs/gramps/template index 3aa8997f51c..35e3245ef62 100644 --- a/srcpkgs/gramps/template +++ b/srcpkgs/gramps/template @@ -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 } diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template index 5dfcfded2d8..d5d12ff8b23 100644 --- a/srcpkgs/kicad/template +++ b/srcpkgs/kicad/template @@ -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() { diff --git a/srcpkgs/libcec/template b/srcpkgs/libcec/template index f956cfcd468..13f44a65b84 100644 --- a/srcpkgs/libcec/template +++ b/srcpkgs/libcec/template @@ -44,7 +44,7 @@ python3-libcec_package() { depends="python3 libcec>=${version}" pkg_install() { - vmove "${py3_lib#/}" + vmove "${py3_lib}" } } libcec-devel_package() { diff --git a/srcpkgs/libffado/template b/srcpkgs/libffado/template index 2aa44e3be1b..cb5abd08fb1 100644 --- a/srcpkgs/libffado/template +++ b/srcpkgs/libffado/template @@ -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 diff --git a/srcpkgs/opencv/template b/srcpkgs/opencv/template index d707ed34dda..2015ca6db52 100644 --- a/srcpkgs/opencv/template +++ b/srcpkgs/opencv/template @@ -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 diff --git a/srcpkgs/opencv4/template b/srcpkgs/opencv4/template index 746ed456f3e..c6a21b58cac 100644 --- a/srcpkgs/opencv4/template +++ b/srcpkgs/opencv4/template @@ -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" diff --git a/srcpkgs/rpm/template b/srcpkgs/rpm/template index bc3d44d9428..26d91814102 100644 --- a/srcpkgs/rpm/template +++ b/srcpkgs/rpm/template @@ -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"