retext: add recipe for version 6.0.2.

* icons in toolbar are missing.
This commit is contained in:
Jerome Duval
2017-01-28 11:47:21 +01:00
parent fe8791f08b
commit eb5f7d2f2a
2 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
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

@@ -0,0 +1,55 @@
SUMMARY="Simple but powerful editor for Markdown and reStructuredText"
DESCRIPTION="ReText is a simple but powerful editor for Markdown and \
reStructuredText markup languages."
HOMEPAGE="https://github.com/retext-project/retext"
COPYRIGHT="20112016 Dmitry Shachnev
20112016 Maurice van der Pot"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="50c02d69ff6dca8863003e913a2acae7f3041e44ea96852e2dac303d435d1ca2"
PATCHES="retext-$portVersion.tar.gz"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
retext$secondaryArchSuffix = $portVersion
cmd:retext$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
python3_markups
python3_pyqt
lib:libxcb$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
python3_pyqt >= 5
python3_setuptools
"
BUILD_PREREQUIRES="
cmd:python3
"
BUILD()
{
$portPackageLinksDir/cmd~python3/bin/python3 setup.py build
}
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python3/bin/python3
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
$python setup.py install \
--root=/ --prefix=$prefix
mkdir -p $(dirname $dataDir)
mv $prefix/share $dataDir
}