From af2c2afb25ce2b62767cdc639cf6d0c4fb967eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 14:44:34 +0200 Subject: Fix hardcoded link flag to "dl" library Fix "dlopen" function detection --- CMakeLists.txt | 13 +++++++++---- tdestyles/kthemestyle/CMakeLists.txt | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ee04b5c6..5433fe121 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -475,10 +475,15 @@ set( kde_socklen_t socklen_t ) ##### check for libdl ########################### -find_library( HAVE_LIBDL dl ) -if( NOT HAVE_LIBDL-NOTFOUND ) - set( DL_LIBRARIES dl ) -endif( NOT HAVE_LIBDL-NOTFOUND ) +set( DL_LIBRARIES dl ) +check_library_exists( ${DL_LIBRARIES} dlopen /lib HAVE_LIBDL ) +if( NOT HAVE_LIBDL ) + unset( DL_LIBRARIES ) + check_function_exists( dlopen HAVE_DLOPEN ) + if( HAVE_DLOPEN ) + set( HAVE_LIBDL 1 ) + endif( HAVE_DLOPEN ) +endif( NOT HAVE_LIBDL ) ##### check for utempter ######################## diff --git a/tdestyles/kthemestyle/CMakeLists.txt b/tdestyles/kthemestyle/CMakeLists.txt index 4c2f06d23..8a1bd2a8c 100644 --- a/tdestyles/kthemestyle/CMakeLists.txt +++ b/tdestyles/kthemestyle/CMakeLists.txt @@ -36,6 +36,6 @@ set( ${target}_SRCS tde_add_kpart( ${target} AUTOMOC SOURCES ${${target}_SRCS} - LINK tdefx-shared tdecore-shared dl + LINK tdefx-shared tdecore-shared ${DL_LIBRARIES} DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/styles ) -- cgit v1.2.1 From e61585edf09d3136c92e255e26dc054d3e22cd7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 16:28:01 +0200 Subject: Add support for openbsd pty in kpty --- tdecore/kpty.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tdecore/kpty.cpp b/tdecore/kpty.cpp index a94204241..7f27f02f8 100644 --- a/tdecore/kpty.cpp +++ b/tdecore/kpty.cpp @@ -305,6 +305,17 @@ bool KPty::open() if (d->masterFd >= 0) return true; +#if defined(__OpenBSD__) + char cpty[16]; + + if (openpty(&d->masterFd, &d->slaveFd, cpty, NULL, &d->winSize) == 0) { + d->ttyName = cpty; + } else { + kdWarning(175) << "Can't open slave pseudo teletype" << endl; + return false; + } +#else + TQCString ptyName; // Find a master pty that we can open //////////////////////////////// @@ -379,6 +390,7 @@ bool KPty::open() kdWarning(175) << "KPty::open(): " << "Can't open a pseudo teletype" << endl; return false; +#endif gotpty: return _attachPty(d->masterFd); @@ -568,8 +580,10 @@ int KPty::slaveFd() const // private bool KPty::chownpty(bool grant) { +#if !defined(__OpenBSD__) TDEProcess proc; proc << locate("exe", BASE_CHOWN) << (grant?"--grant":"--revoke") << TQString::number(d->masterFd); return proc.start(TDEProcess::Block) && proc.normalExit() && !proc.exitStatus(); +#endif } -- cgit v1.2.1 From 439f3ba7ea9aa0b850f70b520081d6bac8c83752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 16:31:25 +0200 Subject: Add support for openbsd in kresolver --- tdecore/network/kresolver.cpp | 121 +++++++++++++++++++++++++++++++++++------- tdecore/network/kresolver_p.h | 2 + 2 files changed, 105 insertions(+), 18 deletions(-) diff --git a/tdecore/network/kresolver.cpp b/tdecore/network/kresolver.cpp index b9ac605c0..6ec0c5aba 100644 --- a/tdecore/network/kresolver.cpp +++ b/tdecore/network/kresolver.cpp @@ -66,6 +66,10 @@ TQMutex getXXbyYYmutex; #endif +#ifdef __OpenBSD__ +#define USE_OPENBSD 1 +#endif + using namespace KNetwork; using namespace KNetwork::Internal; @@ -616,17 +620,28 @@ TQStrList KResolver::protocolName(int protonum) pe = getprotobynumber(protonum); #else +# ifdef USE_OPENBSD // OpenBSD uses an HP/IBM/DEC API + struct protoent protobuf; + struct protoent_data pdata; + ::memset(&pdata, 0, sizeof pdata); + + if (getprotobynumber_r(protonum, &protobuf, &pdata) == 0) + pe = &protobuf; + else + pe = 0; + +# else size_t buflen = 1024; struct protoent protobuf; char *buf; do { buf = new char[buflen]; -# ifdef USE_SOLARIS // Solaris uses a 4 argument getprotobynumber_r which returns struct *protoent or NULL +# ifdef USE_SOLARIS // Solaris uses a 4 argument getprotobynumber_r which returns struct *protoent or NULL if ((pe = getprotobynumber_r(protonum, &protobuf, buf, buflen)) && (errno == ERANGE)) -# else +# else if (getprotobynumber_r(protonum, &protobuf, buf, buflen, &pe) == ERANGE) -# endif +# endif { pe = 0L; buflen += 1024; @@ -636,6 +651,7 @@ TQStrList KResolver::protocolName(int protonum) break; } while (pe == 0L); +# endif #endif // Do common processing @@ -648,7 +664,9 @@ TQStrList KResolver::protocolName(int protonum) } #ifdef HAVE_GETPROTOBYNAME_R +# ifndef USE_OPENBSD delete [] buf; +# endif #endif return lst; @@ -663,17 +681,28 @@ TQStrList KResolver::protocolName(const char *protoname) pe = getprotobyname(protoname); #else +# ifdef USE_OPENBSD // OpenBSD uses an HP/IBM/DEC API + struct protoent protobuf; + struct protoent_data pdata; + ::memset(&pdata, 0, sizeof pdata); + + if (getprotobyname_r(protoname, &protobuf, &pdata) == 0) + pe = &protobuf; + else + pe = 0; + +# else size_t buflen = 1024; struct protoent protobuf; char *buf; do { buf = new char[buflen]; -# ifdef USE_SOLARIS // Solaris uses a 4 argument getprotobyname_r which returns struct *protoent or NULL +# ifdef USE_SOLARIS // Solaris uses a 4 argument getprotobyname_r which returns struct *protoent or NULL if ((pe = getprotobyname_r(protoname, &protobuf, buf, buflen)) && (errno == ERANGE)) -# else +# else if (getprotobyname_r(protoname, &protobuf, buf, buflen, &pe) == ERANGE) -# endif +# endif { pe = 0L; buflen += 1024; @@ -683,6 +712,7 @@ TQStrList KResolver::protocolName(const char *protoname) break; } while (pe == 0L); +# endif #endif // Do common processing @@ -695,7 +725,9 @@ TQStrList KResolver::protocolName(const char *protoname) } #ifdef HAVE_GETPROTOBYNAME_R +# ifndef USE_OPENBSD delete [] buf; +# endif #endif return lst; @@ -710,17 +742,28 @@ int KResolver::protocolNumber(const char *protoname) pe = getprotobyname(protoname); #else +# ifdef USE_OPENBSD // OpenBSD uses an HP/IBM/DEC API + struct protoent protobuf; + struct protoent_data pdata; + ::memset(&pdata, 0, sizeof pdata); + + if (getprotobyname_r(protoname, &protobuf, &pdata) == 0) + pe = &protobuf; + else + pe = 0; + +# else size_t buflen = 1024; struct protoent protobuf; char *buf; do { buf = new char[buflen]; -# ifdef USE_SOLARIS // Solaris uses a 4 argument getprotobyname_r which returns struct *protoent or NULL +# ifdef USE_SOLARIS // Solaris uses a 4 argument getprotobyname_r which returns struct *protoent or NULL if ((pe = getprotobyname_r(protoname, &protobuf, buf, buflen)) && (errno == ERANGE)) -# else +# else if (getprotobyname_r(protoname, &protobuf, buf, buflen, &pe) == ERANGE) -# endif +# endif { pe = 0L; buflen += 1024; @@ -730,6 +773,7 @@ int KResolver::protocolNumber(const char *protoname) break; } while (pe == 0L); +# endif #endif // Do common processing @@ -738,7 +782,9 @@ int KResolver::protocolNumber(const char *protoname) protonum = pe->p_proto; #ifdef HAVE_GETPROTOBYNAME_R +# ifndef USE_OPENBSD delete [] buf; +# endif #endif return protonum; @@ -753,17 +799,27 @@ int KResolver::servicePort(const char *servname, const char *protoname) se = getservbyname(servname, protoname); #else +# ifdef USE_OPENBSD // OpenBSD uses an HP/IBM/DEC API + struct servent servbuf; + struct servent_data sdata; + ::memset(&sdata, 0, sizeof sdata); + if (getservbyname_r(servname, protoname, &servbuf, &sdata) == 0) + se = &servbuf; + else + se = 0; + +# else size_t buflen = 1024; struct servent servbuf; char *buf; do { buf = new char[buflen]; -# ifdef USE_SOLARIS // Solaris uses a 5 argument getservbyname_r which returns struct *servent or NULL +# ifdef USE_SOLARIS // Solaris uses a 5 argument getservbyname_r which returns struct *servent or NULL if ((se = getservbyname_r(servname, protoname, &servbuf, buf, buflen)) && (errno == ERANGE)) -# else +# else if (getservbyname_r(servname, protoname, &servbuf, buf, buflen, &se) == ERANGE) -# endif +# endif { se = 0L; buflen += 1024; @@ -773,6 +829,7 @@ int KResolver::servicePort(const char *servname, const char *protoname) break; } while (se == 0L); +# endif #endif // Do common processing @@ -781,7 +838,9 @@ int KResolver::servicePort(const char *servname, const char *protoname) servport = ntohs(se->s_port); #ifdef HAVE_GETSERVBYNAME_R +# ifndef USE_OPENBSD delete [] buf; +# endif #endif return servport; @@ -796,17 +855,27 @@ TQStrList KResolver::serviceName(const char* servname, const char *protoname) se = getservbyname(servname, protoname); #else +# ifdef USE_OPENBSD // OpenBSD uses an HP/IBM/DEC API + struct servent servbuf; + struct servent_data sdata; + ::memset(&sdata, 0, sizeof sdata); + if (getservbyname_r(servname, protoname, &servbuf, &sdata) == 0) + se = &servbuf; + else + se = 0; + +# else size_t buflen = 1024; struct servent servbuf; char *buf; do { buf = new char[buflen]; -# ifdef USE_SOLARIS // Solaris uses a 5 argument getservbyname_r which returns struct *servent or NULL +# ifdef USE_SOLARIS // Solaris uses a 5 argument getservbyname_r which returns struct *servent or NULL if ((se = getservbyname_r(servname, protoname, &servbuf, buf, buflen)) && (errno == ERANGE)) -# else +# else if (getservbyname_r(servname, protoname, &servbuf, buf, buflen, &se) == ERANGE) -# endif +# endif { se = 0L; buflen += 1024; @@ -816,6 +885,7 @@ TQStrList KResolver::serviceName(const char* servname, const char *protoname) break; } while (se == 0L); +# endif #endif // Do common processing @@ -828,7 +898,9 @@ TQStrList KResolver::serviceName(const char* servname, const char *protoname) } #ifdef HAVE_GETSERVBYNAME_R +# ifndef USE_OPENBSD delete [] buf; +# endif #endif return lst; @@ -843,17 +915,27 @@ TQStrList KResolver::serviceName(int port, const char *protoname) se = getservbyport(port, protoname); #else +# ifdef USE_OPENBSD // OpenBSD uses an HP/IBM/DEC API + struct servent servbuf; + struct servent_data sdata; + ::memset(&sdata, 0, sizeof sdata); + if (getservbyport_r(port, protoname, &servbuf, &sdata) == 0) + se = &servbuf; + else + se = 0; + +# else size_t buflen = 1024; struct servent servbuf; char *buf; do { buf = new char[buflen]; -# ifdef USE_SOLARIS // Solaris uses a 5 argument getservbyport_r which returns struct *servent or NULL +# ifdef USE_SOLARIS // Solaris uses a 5 argument getservbyport_r which returns struct *servent or NULL if ((se = getservbyport_r(port, protoname, &servbuf, buf, buflen)) && (errno == ERANGE)) -# else +# else if (getservbyport_r(port, protoname, &servbuf, buf, buflen, &se) == ERANGE) -# endif +# endif { se = 0L; buflen += 1024; @@ -863,6 +945,7 @@ TQStrList KResolver::serviceName(int port, const char *protoname) break; } while (se == 0L); +# endif #endif // Do common processing @@ -875,7 +958,9 @@ TQStrList KResolver::serviceName(int port, const char *protoname) } #ifdef HAVE_GETSERVBYPORT_R +# ifndef USE_OPENBSD delete [] buf; +# endif #endif return lst; diff --git a/tdecore/network/kresolver_p.h b/tdecore/network/kresolver_p.h index 7f74c6fe6..9cc139458 100644 --- a/tdecore/network/kresolver_p.h +++ b/tdecore/network/kresolver_p.h @@ -48,6 +48,7 @@ extern TQMutex getXXbyYYmutex; #endif /* some systems have the functions, but don't declare them */ +#ifndef __OpenBSD__ #if defined(HAVE_GETSERVBYNAME_R) && !HAVE_DECL_GETSERVBYNAME_R extern "C" { struct servent; @@ -69,6 +70,7 @@ extern "C" { struct protoent** result); } #endif +#endif /* decide whether res_init is thread-safe or not */ #if defined(__GLIBC__) -- cgit v1.2.1 From 8f3cf10d983400f11af2cd73fd7bb585365e0413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 16:33:10 +0200 Subject: Fix FTBFS because Linux specific include in tdeapplication.cpp --- tdecore/tdeapplication.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tdecore/tdeapplication.cpp b/tdecore/tdeapplication.cpp index 450e522c1..c92479490 100644 --- a/tdecore/tdeapplication.cpp +++ b/tdecore/tdeapplication.cpp @@ -177,7 +177,9 @@ typedef void* IceIOErrorHandler; #if defined Q_WS_X11 #include +#ifdef __linux__ #include +#endif extern "C" { extern int getfd(const char *fnam); } -- cgit v1.2.1 From b588c6e6bde4c3330b2e3378ca3447b16cb89bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 16:34:34 +0200 Subject: Add 'tdesu' to tdeioslave_file mount/umount command on openbsd --- tdeioslave/file/file.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tdeioslave/file/file.cc b/tdeioslave/file/file.cc index b13357fe6..ad1cc5574 100644 --- a/tdeioslave/file/file.cc +++ b/tdeioslave/file/file.cc @@ -1455,6 +1455,9 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c dev.data() point.data() tmp ); +#elif defined(__OpenBSD__) + buffer.sprintf( "%s %s %s -t %s %s %s 2>%s", "tdesu", mountProg.latin1(), readonly.data(), + fstype.data(), dev.data(), point.data(), tmp ); #else buffer.sprintf( "%s %s -t %s %s %s 2>%s", mountProg.latin1(), readonly.data(), fstype.data(), dev.data(), point.data(), tmp ); @@ -1614,7 +1617,11 @@ void FileProtocol::unmount( const TQString& _point ) error( TDEIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \"umount\"")); return; } +#ifdef __OpenBSD__ + buffer.sprintf( "%s %s %s 2>%s", "tdesu", umountProg.latin1(), TQFile::encodeName(TDEProcess::quote(_point)).data(), tmp ); +#else buffer.sprintf( "%s %s 2>%s", umountProg.latin1(), TQFile::encodeName(TDEProcess::quote(_point)).data(), tmp ); +#endif system( buffer.data() ); #endif /* HAVE_VOLMGT */ -- cgit v1.2.1 From 9c7a8637edeafb8abe66c2767837dfeb5f058537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 16:37:12 +0200 Subject: Fix FTBFS because undefined __progname in tdeio_connection --- tdeio/tdeio/connection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tdeio/tdeio/connection.cpp b/tdeio/tdeio/connection.cpp index 119ab6a10..50427aecf 100644 --- a/tdeio/tdeio/connection.cpp +++ b/tdeio/tdeio/connection.cpp @@ -43,7 +43,11 @@ #include #include +#if defined(__OpenBSD__) +#define __progname getprogname() +#else extern char *__progname; +#endif using namespace TDEIO; -- cgit v1.2.1 From 78a66b11ddca8b557df4c73fec99469f78727382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 16:38:00 +0200 Subject: Disable environment-based completion in kurlcompletion on openbsd --- tdeio/tdeio/kurlcompletion.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tdeio/tdeio/kurlcompletion.cpp b/tdeio/tdeio/kurlcompletion.cpp index 72f91261d..9184e0d02 100644 --- a/tdeio/tdeio/kurlcompletion.cpp +++ b/tdeio/tdeio/kurlcompletion.cpp @@ -778,10 +778,15 @@ bool KURLCompletion::userCompletion(const MyURL &url, TQString *match) // Environment variables // +#if !defined(__OpenBSD__) extern char **environ; // Array of environment variables +#endif bool KURLCompletion::envCompletion(const MyURL &url, TQString *match) { +#if defined(__OpenBSD__) + return false; +#else if ( url.file().at(0) != '$' ) return false; @@ -816,6 +821,7 @@ bool KURLCompletion::envCompletion(const MyURL &url, TQString *match) *match = finished(); return true; +#endif } ////////////////////////////////////////////////// -- cgit v1.2.1 From 754647ba5a501c4e6d872746a7f69248a752b828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 16:39:58 +0200 Subject: Fix cupsd process detection --- tdeprint/cups/cupsdconf2/cupsddialog.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tdeprint/cups/cupsdconf2/cupsddialog.cpp b/tdeprint/cups/cupsdconf2/cupsddialog.cpp index 22a3b2d54..1800aaae4 100644 --- a/tdeprint/cups/cupsdconf2/cupsddialog.cpp +++ b/tdeprint/cups/cupsdconf2/cupsddialog.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -70,6 +71,18 @@ extern "C" int getServerPid() { +#if defined(__OpenBSD__) + TQProcess *proc = new TQProcess(); + proc->addArgument("pgrep"); + proc->addArgument("cupsd"); + proc->start(); + while (proc->isRunning()); //Wait for process to exit + TQString pidString = proc->readLineStdout(); + bool ok; + int pid = pidString.toInt(&ok); + if (ok) return pid; + return (-1); +#else TQDir dir("/proc",TQString::null,TQDir::Name,TQDir::Dirs); for (uint i=0;i Date: Sun, 5 Oct 2014 16:40:33 +0200 Subject: Fix cups default directories on openbsd --- tdeprint/cups/kmcupsmanager.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/tdeprint/cups/kmcupsmanager.cpp b/tdeprint/cups/kmcupsmanager.cpp index eaf5070b8..7f06e0636 100644 --- a/tdeprint/cups/kmcupsmanager.cpp +++ b/tdeprint/cups/kmcupsmanager.cpp @@ -101,11 +101,20 @@ TQString KMCupsManager::driverDbCreationProgram() TQString KMCupsManager::driverDirectory() { TQString d = cupsInstallDir(); - if (d.isEmpty()) + if (d.isEmpty()) { +#ifdef __OpenBSD__ + d = "/usr/local"; +#else d = "/usr"; +#endif + } d.append("/share/cups/model"); // raw foomatic support +#ifdef __OpenBSD__ + d.append(":/usr/local/share/foomatic/db/source"); +#else d.append(":/usr/share/foomatic/db/source"); +#endif return d; } @@ -138,7 +147,7 @@ bool KMCupsManager::createPrinter(KMPrinter *p) req.setOperation(CUPS_ADD_CLASS); TQStringList members = p->members(), uris; TQString s; - s = TQString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); + s = TQString::fromLocal8Bit("ipp://%1/printers/").arg(CupsInfos::self()->hostaddr()); for (TQStringList::ConstIterator it=members.begin(); it!=members.end(); ++it) uris.append(s+(*it)); req.addURI(IPP_TAG_PRINTER,"member-uris",uris); @@ -627,7 +636,11 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname) { TQStringList comps = TQStringList::split('/', drname, false); TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8)); +#ifdef __OpenBSD__ + TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/local/bin:/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); +#else TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin"); +#endif TQString exe = TDEStandardDirs::findExe("foomatic-datafile", PATH); if (exe.isEmpty()) { @@ -937,10 +950,15 @@ void KMCupsManager::exportDriver() !m_currentprinter->isClass(true) && !m_currentprinter->isSpecial()) { TQString path = cupsInstallDir(); - if (path.isEmpty()) + if (path.isEmpty()) { +#ifdef __OpenBSD__ + path = "/usr/local/share/cups"; +#else path = "/usr/share/cups"; - else +#endif + } else { path += "/share/cups"; + } CupsAddSmb::exportDest(m_currentprinter->printerName(), path); } } -- cgit v1.2.1 From cca50763480753652ae019bf74eb1fa98194d209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 16:41:48 +0200 Subject: Fix default spell checker on openbsd --- tdeui/ksconfig.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index a9958dea9..ddae27e25 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/ksconfig.cpp @@ -188,7 +188,11 @@ KSpellConfig::readGlobalSettings() setDictionary ( kc->readEntry("KSpell_Dictionary") ); setDictFromList ( kc->readNumEntry("KSpell_DictFromList", false) ); setEncoding ( kc->readNumEntry ("KSpell_Encoding", KS_E_UTF8) ); +#ifdef __OpenBSD__ + setClient ( kc->readNumEntry ("KSpell_Client", KS_CLIENT_ASPELL) ); +#else setClient ( kc->readNumEntry ("KSpell_Client", KS_CLIENT_ISPELL) ); +#endif return true; } -- cgit v1.2.1 From 8e7888b85708c6e5d7a3b404c40a1bcf9c807bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 16:55:26 +0200 Subject: Fix FTBFS on openbsd because missing link to "util" library --- tdecore/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdecore/CMakeLists.txt b/tdecore/CMakeLists.txt index 5133be82e..508ca855b 100644 --- a/tdecore/CMakeLists.txt +++ b/tdecore/CMakeLists.txt @@ -131,7 +131,7 @@ tde_add_library( ${target} SHARED AUTOMOC EMBED tdecorenetwork-static tdehw-static LINK ltdlc-static ${KDESVGICONS} DCOP-shared tdefx-shared ${ZLIB_LIBRARIES} ${LIBIDN_LIBRARIES} ${XCOMPOSITE_LIBRARIES} ICE SM ${GAMIN_LIBRARIES} - ${LIBBFD_LIBRARIES} + ${LIBBFD_LIBRARIES} util DEPENDENCIES dcopidl dcopidl2cpp DESTINATION ${LIB_INSTALL_DIR} ) -- cgit v1.2.1 From 3f5a4b419f7907ba61c6f63458e0413cccb74760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 5 Oct 2014 17:05:09 +0200 Subject: Fix detection of some headers on openbsd Many headers requires additional include stdlib.h --- CMakeLists.txt | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5433fe121..52ee5c17c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -181,6 +181,12 @@ check_include_file( "mntent.h" HAVE_MNTENT_H ) check_include_file( "ndir.h" HAVE_NDIR_H ) check_include_file( "netinet/in.h" HAVE_NETINET_IN_H ) check_include_file( "net/if.h" HAVE_NET_IF_H ) +if( NOT HAVE_NET_IF_H ) + find_path( NET_IF_PATH "net/if.h" ) + if( NET_IF_PATH ) + set( HAVE_NET_IF_H "1" ) + endif( ) +endif( ) check_include_file( "paths.h" HAVE_PATHS_H ) check_include_file( "pty.h" HAVE_PTY_H ) check_include_file( "stdint.h" HAVE_STDINT_H ) @@ -197,6 +203,12 @@ check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H ) check_include_file( "sys/mntent.h" HAVE_SYS_MNTENT_H ) check_include_file( "sys/mnttab.h" HAVE_SYS_MNTTAB_H ) check_include_file( "sys/mount.h" HAVE_SYS_MOUNT_H ) +if( NOT HAVE_SYS_MOUNT_H ) + find_path( SYS_MOUNT_PATH "sys/mount.h" ) + if( SYS_MOUNT_PATH ) + set( HAVE_SYS_MOUNT_H "1" ) + endif( ) +endif( ) check_include_file( "sys/ndir.h" HAVE_SYS_NDIR_H ) check_include_file( "sys/param.h" HAVE_SYS_PARAM_H ) check_include_file( "sys/prctl.h" HAVE_SYS_PRCTL_H ) @@ -206,6 +218,12 @@ check_include_file( "sys/stat.h" HAVE_SYS_STAT_H ) check_include_file( "sys/stropts.h" HAVE_SYS_STROPTS_H ) check_include_file( "sys/types.h" HAVE_SYS_TYPES_H ) check_include_file( "sys/ucred.h" HAVE_SYS_UCRED_H ) +if( NOT HAVE_SYS_UCRED_H ) + find_path( SYS_UCRED_PATH "sys/ucred.h" ) + if( SYS_UCRED_PATH ) + set( HAVE_SYS_UCRED_H "1" ) + endif( ) +endif( ) check_include_file( "sys/xattr.h" HAVE_SYS_XATTR_H ) check_include_file( "termios.h" HAVE_TERMIOS_H ) check_include_file( "termio.h" HAVE_TERMIO_H ) @@ -263,7 +281,7 @@ check_function_exists( mkstemps HAVE_MKSTEMPS ) check_symbol_exists( mkstemps "stdlib.h" HAVE_MKSTEMPS_PROTO ) check_function_exists( initgroups HAVE_INITGROUPS ) -check_symbol_exists( initgroups "grp.h" HAVE_INITGROUPS_PROTO ) +check_symbol_exists( initgroups "grp.h;unistd.h" HAVE_INITGROUPS_PROTO ) check_function_exists( strlcat HAVE_STRLCAT ) check_symbol_exists( strlcat "string.h" HAVE_STRLCAT_PROTO ) @@ -305,6 +323,9 @@ if (HAVE_ALLOCA_H ) else (HAVE_ALLOCA_H ) check_symbol_exists( alloca "stdlib.h" HAVE_ALLOCA ) endif (HAVE_ALLOCA_H ) +if( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" ) + set( HAVE_ALLOCA 1 ) +endif( ) check_function_exists( getmntinfo HAVE_GETMNTINFO ) check_function_exists( getnameinfo HAVE_GETNAMEINFO ) -- cgit v1.2.1