- update to latest upstream (3.9)

This commit is contained in:
Tomas Janousek 2008-01-07 11:40:14 +00:00
parent f8beeac4ff
commit 7eecaf9085
7 changed files with 197 additions and 157 deletions

View File

@ -1 +1 @@
brltty-3.8.tar.gz
brltty-3.9.tar.gz

View File

@ -1,17 +0,0 @@
Fix the Tcl binding install script -- did not install to /usr/lib64.
Signed-off-by: Tomas Janousek <tjanouse@redhat.com>
Reviewed-by: Stepan Kasal <skasal@redhat.com>
---
--- brltty-3.8/Bindings/Tcl/pkgutil.lib64 2007-06-04 15:20:32.000000000 +0200
+++ brltty-3.8/Bindings/Tcl/pkgutil 2007-08-21 15:08:46.000000000 +0200
@@ -31,7 +31,7 @@
}
set directory [eval file join / [lrange $components $rootCount end]]
- if {[string equal [file tail $directory] lib]} {
+ if {[string equal [file tail $directory] lib] || [string equal [file tail $directory] lib64]} {
global optionValues packageName packageVersion
return [file join "$optionValues(root)$directory" "$packageName-$packageVersion"]
}

View File

@ -1,127 +0,0 @@
Fix the calls to whatever->open to compile with newer glibc.
The glibc upstream has recently defined open as macro to check for incorrect
usage of the third parameter. This is correct, the POSIX standard says that it
may be declared in such a way. The attached patch redefines all those
> whatever->open(...)
calls to
> (whatever->open)(...)
. I also replaced the close calls, since close may be declared as macro too.
Signed-off-by: Tomas Janousek <tjanouse@redhat.com>
Reviewed-by: Stepan Kasal <skasal@redhat.com>
---
--- brltty-3.8/Programs/config.c.openmacro 2007-08-21 14:25:42.000000000 +0200
+++ brltty-3.8/Programs/config.c 2007-08-21 14:28:07.000000000 +0200
@@ -1383,13 +1383,13 @@
openBrailleDriver (void) {
initializeBraille();
- if (braille->open(&brl, brailleParameters, brailleDevice)) {
+ if ((braille->open)(&brl, brailleParameters, brailleDevice)) {
if (allocateBrailleBuffer(&brl)) {
brailleOpened = 1;
return 1;
}
- braille->close(&brl);
+ (braille->close)(&brl);
} else {
LogPrint(LOG_DEBUG, "%s: %s -> %s",
gettext("braille driver initialization failed"),
@@ -1403,7 +1403,7 @@
closeBrailleDriver (void) {
brailleOpened = 0;
drainBrailleOutput(&brl, 0);
- braille->close(&brl);
+ (braille->close)(&brl);
if (brl.isCoreBuffer) {
free(brl.buffer);
@@ -1657,7 +1657,7 @@
openSpeechDriver (void) {
initializeSpeech();
- if (speech->open(speechParameters)) {
+ if ((speech->open)(speechParameters)) {
return 1;
} else {
LogPrint(LOG_DEBUG, "speech driver initialization failed: %s",
@@ -1669,7 +1669,7 @@
void
closeSpeechDriver (void) {
- speech->close();
+ (speech->close)();
}
static int
--- brltty-3.8/Programs/tunes.c.openmacro 2007-08-21 14:25:42.000000000 +0200
+++ brltty-3.8/Programs/tunes.c 2007-08-21 14:28:54.000000000 +0200
@@ -480,7 +480,7 @@
}
if (!generator) return 0;
- if (noteGenerator) noteGenerator->close();
+ if (noteGenerator) (noteGenerator->close)();
closeTimer = 0;
noteGenerator = generator;
return 1;
@@ -490,7 +490,7 @@
closeTuneDevice (int force) {
if (closeTimer) {
if (force) closeTimer = 1;
- if (!--closeTimer) noteGenerator->close();
+ if (!--closeTimer) (noteGenerator->close)();
}
}
@@ -499,7 +499,7 @@
int tunePlayed = 0;
if (prefs.alertTunes && tune->elements) {
if (noteGenerator) {
- if (noteGenerator->open(openErrorLevel)) {
+ if ((noteGenerator->open)(openErrorLevel)) {
TuneElement *element = tune->elements;
tunePlayed = 1;
closeTimer = 2000 / updateInterval;
--- brltty-3.8/Programs/brltest.c.openmacro 2007-08-21 14:25:42.000000000 +0200
+++ brltty-3.8/Programs/brltest.c 2007-08-21 14:27:31.000000000 +0200
@@ -161,14 +161,14 @@
initializeBrailleDisplay(&brl);
brl.dataDirectory = opt_dataDirectory;
identifyBrailleDriver(braille, 0); /* start-up messages */
- if (braille->open(&brl, parameterSettings, opt_brailleDevice)) {
+ if ((braille->open)(&brl, parameterSettings, opt_brailleDevice)) {
if (allocateBrailleBuffer(&brl)) {
#ifdef ENABLE_LEARN_MODE
learnMode(&brl, updateInterval, 10000);
#else /* ENABLE_LEARN_MODE */
message("braille test", 0);
#endif /* ENABLE_LEARN_MODE */
- braille->close(&brl); /* finish with the display */
+ (braille->close)(&brl); /* finish with the display */
status = 0;
} else {
LogPrint(LOG_ERR, "can't allocate braille buffer.");
--- brltty-3.8/Programs/spktest.c.openmacro 2007-08-21 14:25:42.000000000 +0200
+++ brltty-3.8/Programs/spktest.c 2007-08-21 14:28:27.000000000 +0200
@@ -163,7 +163,7 @@
if (chdir(opt_dataDirectory) != -1) {
identifySpeechDriver(speech, 0); /* start-up messages */
- if (speech->open(parameterSettings)) {
+ if ((speech->open)(parameterSettings)) {
if (speech->rate) speech->rate(speechRate);
if (speech->volume) speech->volume(speechVolume);
@@ -172,7 +172,7 @@
} else {
processLines(stdin, sayLine, NULL);
}
- speech->close(); /* finish with the display */
+ (speech->close)(); /* finish with the display */
status = 0;
} else {
LogPrint(LOG_ERR, "can't initialize speech driver.");

143
brltty-3.9-javadoc.patch Normal file
View File

@ -0,0 +1,143 @@
--- brltty-3.9/Bindings/Java/BrlapiException.java.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/BrlapiException.java 2008-01-07 12:01:06.000000000 +0100
@@ -17,6 +17,7 @@
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
+package cc.mielke.brltty;
public class BrlapiException extends Exception {
static final long serialVersionUID = 0;
--- brltty-3.9/Bindings/Java/Makefile.in.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/Makefile.in 2008-01-07 12:16:14.000000000 +0100
@@ -48,17 +48,12 @@
JAVA_JAR_FILE = $(API_NAME).jar
jar: $(JAVA_JAR_FILE)
-API_CLASSES = Brlapi.class BrlapiNative.class BrlapiError.class BrlapiException.class BrlapiSettings.class BrlapiWriteArguments.class BrlapiSize.class BrlapiKey.class
-ALL_CLASSES = $(API_CLASSES) ApiTest.class
+$(JAVA_JAR_FILE): apiclasses.made
+ $(JAR) cf $@ -C classes .
-$(JAVA_JAR_FILE): $(API_CLASSES)
- $(JAR) cf $@ Brlapi*.class
-
-$(ALL_CLASSES): $(SRC_DIR)/*.java BrlapiConstants.class
- $(JAVAC) -d . -classpath . $(SRC_DIR)/*.java
-
-BrlapiConstants.class: BrlapiConstants.java
- $(JAVAC) BrlapiConstants.java
+apiclasses.made: $(SRC_DIR)/Brlapi*.java BrlapiConstants.java
+ $(JAVAC) -d classes -classpath . $(SRC_DIR)/Brlapi*.java
+ touch $@
BrlapiConstants.java: $(CONSTANTS_SCRIPTS) $(CONSTANTS_SOURCES)
$(AWK) $(CONSTANTS_OPTIONS) $(CONSTANTS_SOURCES) >$@
@@ -66,12 +61,14 @@
doc: javadoc.made
javadoc.made: $(SRC_DIR)/*.java BrlapiConstants.java
- $(JAVADOC) -quiet -d . -author -version -use $(SRC_DIR)/*.java BrlapiConstants.java
+ $(JAVADOC) -quiet -d doc -author -version -use $(SRC_DIR)/*.java BrlapiConstants.java
touch $@
clean::
- -rm -f BrlapiConstants.java *.class $(JAVA_JAR_FILE) $(JAVA_JNI_FILE)
- -rm -f javadoc.made package-list *.css *.html
+ -rm -f BrlapiConstants.java apiclasses.made $(JAVA_JAR_FILE) $(JAVA_JNI_FILE)
+ -rm -f -r classes
+ -rm -f javadoc.made
+ -rm -f -r doc
-rm -f -r resources
-rm -f gjdoc.properties JAVADOC.PLACEHOLDER
--- brltty-3.9/Bindings/Java/ApiTest.java.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/ApiTest.java 2008-01-07 12:01:06.000000000 +0100
@@ -17,6 +17,7 @@
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
+package cc.mielke.brltty;
public class ApiTest {
public static void main(String argv[]) {
--- brltty-3.9/Bindings/Java/BrlapiWriteArguments.java.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/BrlapiWriteArguments.java 2008-01-07 12:01:06.000000000 +0100
@@ -17,6 +17,7 @@
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
+package cc.mielke.brltty;
public class BrlapiWriteArguments {
public int displayNumber = Brlapi.DISPLAY_DEFAULT;
--- brltty-3.9/Bindings/Java/BrlapiSettings.java.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/BrlapiSettings.java 2008-01-07 12:01:06.000000000 +0100
@@ -17,6 +17,7 @@
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
+package cc.mielke.brltty;
public class BrlapiSettings {
public String host;
--- brltty-3.9/Bindings/Java/BrlapiError.java.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/BrlapiError.java 2008-01-07 12:01:06.000000000 +0100
@@ -17,6 +17,7 @@
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
+package cc.mielke.brltty;
public class BrlapiError extends Exception {
static final long serialVersionUID = 0;
--- brltty-3.9/Bindings/Java/constants.awk.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/constants.awk 2008-01-07 12:01:06.000000000 +0100
@@ -19,6 +19,7 @@
###############################################################################
BEGIN {
+ print "package cc.mielke.brltty;"
print "public interface BrlapiConstants {"
}
--- brltty-3.9/Bindings/Java/BrlapiNative.java.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/BrlapiNative.java 2008-01-07 12:01:06.000000000 +0100
@@ -17,6 +17,7 @@
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
+package cc.mielke.brltty;
public class BrlapiNative {
protected long handle;
--- brltty-3.9/Bindings/Java/BrlapiKey.java.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/BrlapiKey.java 2008-01-07 12:01:06.000000000 +0100
@@ -17,6 +17,7 @@
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
+package cc.mielke.brltty;
public class BrlapiKey {
protected final long code;
--- brltty-3.9/Bindings/Java/Brlapi.java.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/Brlapi.java 2008-01-07 12:01:06.000000000 +0100
@@ -17,6 +17,7 @@
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
+package cc.mielke.brltty;
public class Brlapi extends BrlapiNative implements BrlapiConstants {
protected final BrlapiSettings settings;
--- brltty-3.9/Bindings/Java/BrlapiSize.java.javadoc 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Java/BrlapiSize.java 2008-01-07 12:01:06.000000000 +0100
@@ -17,6 +17,7 @@
*
* This software is maintained by Dave Mielke <dave@mielke.cc>.
*/
+package cc.mielke.brltty;
public class BrlapiSize {
protected final int width;

View File

@ -0,0 +1,11 @@
--- brltty-3.9/Bindings/Tcl/pkgutil.tcl85 2007-10-17 17:19:30.000000000 +0200
+++ brltty-3.9/Bindings/Tcl/pkgutil 2008-01-04 16:07:25.000000000 +0100
@@ -31,7 +31,7 @@
}
set directory [eval file join / [lrange $components $rootCount end]]
- if {[lsearch -exact {lib lib64} [file tail $directory]] >= 0} {
+ if {[regexp /lib(64)?(/|$) $directory] >= 0} {
global optionValues packageName packageVersion
return [file join "$optionValues(root)$directory" "$packageName-$packageVersion"]
}

View File

@ -1,7 +1,8 @@
%define pkg_version 3.8
%define api_version 0.5.0
%define pkg_version 3.9
%define api_version 0.5.1
%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
%define pyver %(%{__python} -c "import sys; v=sys.version_info[:2]; print '%d.%d'%v")
Name: brltty
Version: %{pkg_version}
@ -10,13 +11,13 @@ License: GPLv2+
Group: System Environment/Daemons
URL: http://mielke.cc/brltty/
Source: http://mielke.cc/brltty/releases/%{name}-%{version}.tar.gz
Patch0: brltty-3.8-openmacro.patch
Patch1: brltty-3.8-lib64.patch
Patch0: brltty-3.9-tcl85path.patch
Patch1: brltty-3.9-javadoc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-InstallRoot
Summary: Braille display driver for Linux/Unix.
Requires(post): coreutils
BuildRequires: byacc, glibc-kernheaders
# BuildRequires: java-devel, ocaml
# BuildRequires: ocaml
%description
BRLTTY is a background process (daemon) which provides
@ -95,16 +96,28 @@ Summary: Python binding for BrlAPI.
%description -n python-brlapi
This package provides the Python binding for BrlAPI.
%package -n brlapi-java
Version: %{api_version}
Group: Development/System
License: LGPLv2+
Requires: brlapi = %{api_version}
BuildRequires: java-devel
#BuildRequires: java-1.7.0-icedtea-devel
Summary: Java binding for BrlAPI.
%description -n brlapi-java
This package provides the Java binding for BrlAPI.
%define version %{pkg_version}
%prep
%setup
%patch0 -p1 -b .openmacro
%patch1 -p1 -b .lib64
%setup -q
%patch0 -p1 -b .tcl85path
%patch1 -p1 -b .javadoc
./autogen
%build
%configure --with-install-root="${RPM_BUILD_ROOT}" --with-braille-driver=-tt
make
make %{?_smp_mflags}
for file in $(find . \( -path ./doc -o -path ./Documents \) -prune -o \( -name 'README*' -o -name '*.txt' -o -name '*.html' -o -name '*.sgml' -o -name \*.patch -o \( -path "./Bootdisks/*" -type f -perm +ugo=x \) \) -print)
do
@ -113,6 +126,7 @@ do
done
%install
rm -rf $RPM_BUILD_ROOT
make INSTALL_PROGRAM='$(INSTALL_SCRIPT)' install #install-programs install-help install-tables install-drivers install-manpage
install -m 644 Documents/brltty.conf "${RPM_BUILD_ROOT}%{_sysconfdir}"
rm -f ${RPM_BUILD_ROOT}/usr/bin/xbrlapi # whatever this is, we exclude it for now
@ -183,15 +197,31 @@ exit 0
%files -n tcl-brlapi
%defattr(-,root,root)
%{_libdir}/brlapi-%{api_version}/libbrlapi_tcl.so
%{_libdir}/brlapi-%{api_version}/pkgIndex.tcl
%{_libdir}/tcl*/brlapi-%{api_version}/libbrlapi_tcl.so
%{_libdir}/tcl*/brlapi-%{api_version}/pkgIndex.tcl
%files -n python-brlapi
%defattr(-,root,root)
%{python_sitearch}/brlapi.so
%{python_sitearch}/Brlapi-%{api_version}-py%{pyver}.egg-info
%files -n brlapi-java
%defattr(-,root,root)
%{_jnidir}/libbrlapi_java.so
%{_javadir}/brlapi.jar
%changelog
* Mon Jan 07 2008 Tomas Janousek <tjanouse@redhat.com> - 3.9-1
- update to latest upstream (3.9)
* Tue Sep 18 2007 Tomas Janousek <tjanouse@redhat.com> - 3.8-2.svn3231
- update to r3231 from svn
- added java binding subpackage
* Wed Aug 29 2007 Tomas Janousek <tjanouse@redhat.com> - 3.8-2.svn3231
- update to r3231 from svn
* Tue Aug 21 2007 Tomas Janousek <tjanouse@redhat.com> - 3.8-1
- update to latest upstream
- added the at-spi driver, tcl and python bindings

View File

@ -1 +1 @@
542fa50d1433aa77e151432cc6abeebc brltty-3.8.tar.gz
7ce54ba2d38b7c220870e8c781f36743 brltty-3.9.tar.gz