Branch: master

731d4f0b 2014-10-05 14:03:15 François Andriot
Openbsd: remove useless tqt3 patches
R openbsd/14.0.0/dependencies/tqt3/patches/patch-src_tools_qfile_cpp
R openbsd/14.0.0/dependencies/tqt3/patches/patch-src_tools_qfile_unix_cpp
diff --git a/openbsd/14.0.0/dependencies/tqt3/patches/patch-src_tools_qfile_cpp b/openbsd/14.0.0/dependencies/tqt3/patches/patch-src_tools_qfile_cpp
deleted file mode 100644
index ddf1ad4..0000000
--- a/openbsd/14.0.0/dependencies/tqt3/patches/patch-src_tools_qfile_cpp
+++ /dev/null
@@ -1,68 +0,0 @@
---- src/tools/qfile.cpp.orig	Fri Sep  5 20:07:14 2014
-+++ src/tools/qfile.cpp	Fri Sep  5 20:11:15 2014
-@@ -73,8 +73,13 @@
- {
- public:
-     TQString errorString;
-+    int lastAccess;
- };
- 
-+#define ACCESS_NONE -1
-+#define ACCESS_READ 0
-+#define ACCESS_WRITE 1
-+
- extern bool qt_file_access( const TQString& fn, int t );
- 
- /*!
-@@ -199,6 +204,7 @@
- {
-     delete d;
-     d = new TQFilePrivate;
-+    d->lastAccess = ACCESS_NONE;
-     setFlags( IO_Direct );
-     setStatus( IO_Ok );
-     setErrorString( qt_fileerr_unknown );
-@@ -385,6 +391,10 @@
-     if ( isRaw() ) {				// raw file
- 	nread = TQIODevice::readLine( p, maxlen );
-     } else {					// buffered file
-+        if (d->lastAccess == ACCESS_WRITE) {
-+            ::fseek(fh, 0, SEEK_CUR);
-+            d->lastAccess = ACCESS_READ;
-+        }
- 	p = fgets( p, maxlen, fh );
- 	if ( p ) {
- 	    nread = tqstrlen( p );
-@@ -466,6 +476,10 @@
- 	char buf[1];
- 	ch = readBlock( buf, 1 ) == 1 ? buf[0] : EOF;
-     } else {					// buffered file
-+        if (d->lastAccess == ACCESS_WRITE) {
-+            ::fseek(fh, 0, SEEK_CUR);
-+            d->lastAccess = ACCESS_READ;
-+        }
- 	if ( (ch = getc( fh )) != EOF ) {
- 	    if ( !isSequentialAccess() )
- 		ioIndex++;
-@@ -502,6 +516,10 @@
- 	buf[0] = ch;
- 	ch = writeBlock( buf, 1 ) == 1 ? ch : EOF;
-     } else {					// buffered file
-+        if (d->lastAccess == ACCESS_READ) {
-+            ::fseek(fh, 0, SEEK_CUR);
-+            d->lastAccess = ACCESS_WRITE;
-+        }
- 	if ( (ch = putc( ch, fh )) != EOF ) {
- 	    if ( !isSequentialAccess() )
- 		ioIndex++;
-@@ -556,6 +574,10 @@
- 	else
- 	    ch = EOF;
-     } else {					// buffered file
-+        if (d->lastAccess == ACCESS_WRITE) {
-+            ::fseek(fh, 0, SEEK_CUR);
-+            d->lastAccess = ACCESS_READ;
-+        }
- 	if ( (ch = ungetc(ch, fh)) != EOF ) {
- 	    if ( !isSequentialAccess() )
- 		ioIndex--;
diff --git a/openbsd/14.0.0/dependencies/tqt3/patches/patch-src_tools_qfile_unix_cpp b/openbsd/14.0.0/dependencies/tqt3/patches/patch-src_tools_qfile_unix_cpp
deleted file mode 100644
index 989554b..0000000
--- a/openbsd/14.0.0/dependencies/tqt3/patches/patch-src_tools_qfile_unix_cpp
+++ /dev/null
@@ -1,54 +0,0 @@
---- src/tools/qfile_unix.cpp.orig	Fri Sep  5 20:17:49 2014
-+++ src/tools/qfile_unix.cpp	Fri Sep  5 20:20:59 2014
-@@ -56,6 +56,17 @@
- #include <errno.h>
- #include <limits.h>
- 
-+class TQFilePrivate
-+{
-+public:
-+    TQString errorString;
-+    int lastAccess;
-+};
-+
-+#define ACCESS_NONE -1
-+#define ACCESS_READ 0
-+#define ACCESS_WRITE 1
-+
- extern const char* qt_fileerr_read;
- 
- bool qt_file_access( const TQString& fn, int t )
-@@ -525,6 +536,7 @@
- #else
- 	ok = ( ::fseek(fh, pos, SEEK_SET) == 0 );
- #endif
-+    d->lastAccess = ACCESS_NONE;
-     }
-     if ( ok )
- #if defined(QT_LARGEFILE_SUPPORT) && !defined(QT_ABI_QT4)
-@@ -593,6 +605,10 @@
- 		setErrorStringErrno( errno );
- 	    }
- 	} else {					// buffered file
-+        if (d->lastAccess == ACCESS_WRITE) {
-+        ::fseek(fh, 0, SEEK_CUR);
-+        d->lastAccess = ACCESS_READ;
-+        }
- 	    nread += fread( p, 1, len-nread, fh );
- 	    if ( (uint)nread != len ) {
- 		if ( ferror( fh ) || nread==0 ) {
-@@ -644,8 +660,13 @@
-     TQ_ULONG nwritten;				// number of bytes written
-     if ( isRaw() )				// raw file
- 	nwritten = ::write( fd, (void *)p, len );
--    else					// buffered file
-+	else {					// buffered file
-+		if (d->lastAccess == ACCESS_READ) {
-+			::fseek(fh, 0, SEEK_CUR);
-+			d->lastAccess = ACCESS_WRITE;
-+		}
- 	nwritten = fwrite( p, 1, len, fh );
-+	}
-     if ( nwritten != len ) {		// write error
- 	if ( errno == ENOSPC )			// disk is full
- 	    setStatus( IO_ResourceError );
ef99bab0 2014-10-05 14:54:58 François Andriot
RPM packaging: update tdebase
M redhat/tdebase/tdebase-14.0.0.spec
diff --git a/redhat/tdebase/tdebase-14.0.0.spec b/redhat/tdebase/tdebase-14.0.0.spec
index 0279140..ba81945 100644
--- a/redhat/tdebase/tdebase-14.0.0.spec
+++ b/redhat/tdebase/tdebase-14.0.0.spec
@@ -3467,6 +3467,7 @@
   -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS} -DNDEBUG" \
   -DCMAKE_SKIP_RPATH=OFF \
   -DCMAKE_INSTALL_RPATH="%{tde_libdir}" \
+  -DCMAKE_NO_BUILTIN_CHRPATH=ON \
   -DCMAKE_VERBOSE_MAKEFILE=ON \
   -DWITH_GCC_VISIBILITY=ON \
   \
@@ -3650,6 +3651,14 @@
 }
 EOF
 
+# Move faces icon to XDG directory
+if [ ! -d "%{?buildroot}%{_datadir}/faces" ]; then
+  %__mkdir_p "%{?buildroot}%{_datadir}/faces"
+  %__mv -f "%{?buildroot}%{tde_datadir}/apps/tdm/pics/users/"* "%{?buildroot}%{_datadir}/faces"
+  %__rmdir "%{?buildroot}%{tde_datadir}/apps/tdm/pics/users/"
+  %__ln_s "%{_datadir}/faces" "%{?buildroot}%{tde_datadir}/apps/tdm/pics/users"
+fi
+
 
 %clean
 %__rm -rf %{?buildroot}