retext: bump version

switch to python 3.10
This commit is contained in:
Jerome Duval
2023-12-01 09:46:50 +01:00
parent 566e6edc36
commit 4fdccbc4f3
3 changed files with 18 additions and 84 deletions

View File

@@ -1,38 +0,0 @@
From 64086ebfcd26e89474df38e91430507d4ef0b03d Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 28 Jan 2017 11:43:21 +0100
Subject: find_library() doesn't work on Haiku.
diff --git a/ReText/xsettings.py b/ReText/xsettings.py
index a5647a0..0fbfa4d 100644
--- a/ReText/xsettings.py
+++ b/ReText/xsettings.py
@@ -53,15 +53,15 @@ class XSettingsParseError(XSettingsError):
def get_raw_xsettings(display=0):
# initialize the libraries
- xcb_library_name = ctypes.util.find_library('xcb')
- if xcb_library_name is None:
- raise XSettingsError('Xcb library not found')
- xcb = ctypes.CDLL(xcb_library_name)
-
- c_library_name = ctypes.util.find_library('c')
- if c_library_name is None:
- raise XSettingsError('C library not found')
- c = ctypes.CDLL(c_library_name)
+ # xcb_library_name = ctypes.util.find_library('xcb')
+ # if xcb_library_name is None:
+ # raise XSettingsError('Xcb library not found')
+ xcb = ctypes.CDLL('libxcb.so.1')
+
+ #c_library_name = ctypes.util.find_library('c')
+ #if c_library_name is None:
+ # raise XSettingsError('C library not found')
+ c = ctypes.CDLL('libroot.so')
# set some args and return types
xcb.xcb_connect.argtypes = [ctypes.c_char_p, ctypes.POINTER(ctypes.c_int)]
--
2.10.2

View File

@@ -1,30 +0,0 @@
From 33686e58997fa8a035474e01e8a80dbb46070d4d Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 3 Aug 2017 21:57:44 +0200
Subject: read/write with encoding utf-8.
diff --git a/setup.py b/setup.py
index f065e42..a3e5d03 100755
--- a/setup.py
+++ b/setup.py
@@ -112,14 +112,14 @@ class retext_install(install):
desktop_file_path = join(self.install_data, 'share', 'applications',
'me.mitya57.ReText.desktop')
icon_path = join(self.orig_install_data, 'share', 'retext', 'icons', 'retext.svg')
- with open(desktop_file_path) as desktop_file:
+ with open(desktop_file_path, encoding="utf-8") as desktop_file:
desktop_contents = desktop_file.read()
print('fixing Exec line in %s' % desktop_file_path)
desktop_contents = desktop_contents.replace('Exec=retext', 'Exec=%s' % retext)
if self.orig_install_data != '/usr':
print('fixing Icon line in %s' % desktop_file_path)
desktop_contents = desktop_contents.replace('Icon=retext', 'Icon=%s' % icon_path)
- with open(desktop_file_path, 'w') as desktop_file:
+ with open(desktop_file_path, 'w', encoding="utf-8") as desktop_file:
desktop_file.write(desktop_contents)
--
2.13.1

View File

@@ -5,10 +5,9 @@ HOMEPAGE="https://github.com/retext-project/retext"
COPYRIGHT="20112016 Dmitry Shachnev
20112016 Maurice van der Pot"
LICENSE="GNU GPL v3"
REVISION="6"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="c32ccdbcf31094258c792bc0589ff3ff212dea85466d776b7f60fa7b39da4b6c"
PATCHES="retext-$portVersion.patchset"
CHECKSUM_SHA256="45c47f58c4f9939429da09340833c0ffbe507f2c806e16b30aa1cf90eb954274"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
@@ -19,39 +18,42 @@ PROVIDES="
"
REQUIRES="
haiku$secondaryArchSuffix
markdown_python39
markups_python39
pyqt5_python39
cmd:python3.9
chardet_python310
docutils_python310
markdown_python310
markups_python310
pygments_python310
pyqt5_python310
cmd:python3.10
lib:libxcb$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
pyqt5_python39
setuptools_python39
pyqt5_python310
setuptools_python310
"
BUILD_PREREQUIRES="
cmd:lrelease$secondaryArchSuffix >= 5
cmd:python3.9
cmd:python3.10
"
TEST_REQUIRES="
markups_python39
python_markdown_math_python39
markups_python310
python_markdown_math_python310
qthaikuplugins$secondaryArchSuffix
"
BUILD()
{
$portPackageLinksDir/cmd~python3.9/bin/python3.9 setup.py build
$portPackageLinksDir/cmd~python3.10/bin/python3.10 setup.py build
}
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python3.9/bin/python3.9
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
python=$portPackageLinksDir/cmd~python3.10/bin/python3.10
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c4)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
@@ -65,5 +67,5 @@ INSTALL()
TEST()
{
python3.9 setup.py test
python3.10 setup.py test
}