Skip to content

Commit

Permalink
python fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Jun 30, 2024
1 parent 96fd46d commit 0b6e114
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions dev/lang/python3.12/ympbuild
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,41 @@ maintainer='sulincix'
license=('custom')
source=("https://www.python.org/ftp/python/$version/Python-$version.tar.xz"
'turkman.patch')
depends=('bzip2' 'gdbm' 'libnsl' 'libxcrypt' 'openssl' 'zlib' 'sqlite')
depends=('bzip2' 'gdbm' 'libnsl' 'libxcrypt' 'openssl' 'zlib' 'mpdecimal')
makedepends=( )
sha256sums=('f6d419a6d8743ab26700801b4908d26d97e8b986e14f95de31b32de2b0e79554'
'SKIP')
expat_depends=('expat')
arch=('x86_64')
group=(dev.lang python)

export CFLAGS="-O2 -s -DNCURSES_WIDECHAR=1"
export CXXFLAGS="-O2 -s -DNCURSES_WIDECHAR=1"
export LDFLAGS="-lncursesw"
export CFLAGS="-O2 -s -flto -ffat-lto-objects"
export CXXFLAGS="-O2 -s -flto -ffat-lto-objects"

export LC_CTYPE=en_US.UTF-8
export LANG=en_US.UTF-8

cd Python-$version

setup(){
patch -Np1 -i "../turkman.patch"
./configure --prefix=/usr \
--libdir=/usr/lib \
--libdir=/usr/lib64 \
--enable-ipv6 \
--enable-loadable-sqlite-extensions \
--enable-optimizations \
--enable-shared \
--with-lto \
--with-computed-gotos \
--with-dbmliborder=gdbm:ndbm \
--with-system-expat \
--with-system-libmpdec
}

build(){
make $jobs
sed -i 's/^all:.*$/all: build_all/' Makefile
env -i PATH=$PATH make $jobs
}

package(){
make install $jobs
mv ${DESTDIR}/usr/lib{,64}
env -i PATH=$PATH make install $jobs DESTDIR=$DESTDIR
# this symlinks provided by main python metapackage
for bin in pydoc3 idle3 python3 python3-config pip3 2to3; do
rm -f ${DESTDIR}/usr/bin/$bin
Expand Down

0 comments on commit 0b6e114

Please sign in to comment.