Timothy Pearson 10 years ago
commit 891da4b83e

@ -12,7 +12,10 @@
# #
################################################# #################################################
# required stuff
tde_setup_architecture_flags( ) tde_setup_architecture_flags( )
find_package( TQt )
find_package( TDE )
##### check for libdl ########################### ##### check for libdl ###########################
@ -54,6 +57,18 @@ if( WITH_PAM AND (BUILD_KCHECKPASS OR BUILD_TDM) )
endif( ) endif( )
# crypt
set( CRYPT_LIBRARY crypt )
check_library_exists( ${CRYPT_LIBRARY} crypt "" HAVE_CRYPT )
if( NOT HAVE_CRYPT )
unset( CRYPT_LIBRARY )
check_function_exists( crypt LIBC_HAVE_CRYPT )
if( LIBC_HAVE_CRYPT )
set( HAVE_CRYPT 1 CACHE INTERNAL "" FORCE )
endif( LIBC_HAVE_CRYPT )
endif( NOT HAVE_CRYPT )
# hal (ksmserver, tdeioslaves) # hal (ksmserver, tdeioslaves)
if( WITH_HAL ) if( WITH_HAL )
pkg_search_module( HAL hal ) pkg_search_module( HAL hal )
@ -63,6 +78,24 @@ if( WITH_HAL )
endif( ) endif( )
# tdehwlib (drkonqi, kcontrol, kicker, ksmserver, tdeioslaves, tdm)
if( WITH_TDEHWLIB )
tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
check_cxx_source_compiles( "
#include <kdemacros.h>
#ifndef __TDE_HAVE_TDEHWLIB
#error tdecore is not build with tdehwlib
#endif
int main() { return 0; } "
HAVE_TDEHWLIB
)
tde_restore( CMAKE_REQUIRED_INCLUDES )
if( NOT HAVE_TDEHWLIB )
tde_message_fatal( "tdehwlib is required, but not built in tdecore" )
endif( NOT HAVE_TDEHWLIB )
endif( )
# udev (tsak) # udev (tsak)
if( BUILD_TSAK ) if( BUILD_TSAK )
pkg_search_module( UDEV udev ) pkg_search_module( UDEV udev )
@ -78,8 +111,21 @@ endif( )
if( WITH_GCC_VISIBILITY ) if( WITH_GCC_VISIBILITY )
if( NOT UNIX ) if( NOT UNIX )
tde_message_fatal(FATAL_ERROR "\ngcc visibility support was requested, but your system is not *NIX" ) tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" )
endif( NOT UNIX ) endif( NOT UNIX )
tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
check_cxx_source_compiles( "
#include <kdemacros.h>
#ifndef __KDE_HAVE_GCC_VISIBILITY
#error gcc visibility is not enabled in tdelibs
#endif
int main() { return 0; } "
HAVE_GCC_VISIBILITY
)
tde_restore( CMAKE_REQUIRED_INCLUDES )
if( NOT HAVE_GCC_VISIBILITY )
tde_message_fatal( "gcc visibility support was requested, but not supported in tdelibs" )
endif( NOT HAVE_GCC_VISIBILITY )
set( __KDE_HAVE_GCC_VISIBILITY 1 ) set( __KDE_HAVE_GCC_VISIBILITY 1 )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden") set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
@ -322,8 +368,8 @@ else( )
set( WITHOUT_ARTS 1 ) set( WITHOUT_ARTS 1 )
endif( ) endif( )
# libart
# libart
if( WITH_LIBART ) if( WITH_LIBART )
pkg_search_module( LIBART libart-2.0 ) pkg_search_module( LIBART libart-2.0 )
if( NOT LIBART_FOUND ) if( NOT LIBART_FOUND )
@ -333,12 +379,6 @@ if( WITH_LIBART )
endif( WITH_LIBART ) endif( WITH_LIBART )
# required stuff
find_package( TQt )
find_package( TDE )
# dbus (tdm, kdesktop, twin/compton-tde.c) # dbus (tdm, kdesktop, twin/compton-tde.c)
if( BUILD_TDM OR BUILD_KDESKTOP OR (BUILD_TWIN AND WITH_XCOMPOSITE) ) if( BUILD_TDM OR BUILD_KDESKTOP OR (BUILD_TWIN AND WITH_XCOMPOSITE) )

@ -36,7 +36,9 @@
#include <tdemessagebox.h> #include <tdemessagebox.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdetempfile.h> #include <tdetempfile.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif
#ifdef HAVE_ELFICON #ifdef HAVE_ELFICON
// Elven things // Elven things
@ -356,6 +358,7 @@ void BackTrace::processBacktrace()
} }
#endif // HAVE_ELFICON #endif // HAVE_ELFICON
#ifdef __TDE_HAVE_TDEHWLIB
// Append potentially important hardware information // Append potentially important hardware information
m_strBt.append("\n==== (tdehwlib) hardware information ====\n"); m_strBt.append("\n==== (tdehwlib) hardware information ====\n");
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@ -374,6 +377,7 @@ void BackTrace::processBacktrace()
m_strBt.append("\n"); m_strBt.append("\n");
} }
} }
#endif
{ {
// Clean up hard to read debug blocks // Clean up hard to read debug blocks

@ -9,8 +9,6 @@
# #
################################################# #################################################
find_library( CRYPT_LIBRARY crypt )
if( WITH_PAM AND (NOT DEFINED KCHECKPASS_PAM_SERVICE) ) if( WITH_PAM AND (NOT DEFINED KCHECKPASS_PAM_SERVICE) )
set( KCHECKPASS_PAM_SERVICE "kde" CACHE INTERNAL "" ) set( KCHECKPASS_PAM_SERVICE "kde" CACHE INTERNAL "" )
endif( ) endif( )

@ -64,9 +64,9 @@ if( BUILD_KCONTROL )
add_subdirectory( kthememanager ) add_subdirectory( kthememanager )
add_subdirectory( tdefontinst ) add_subdirectory( tdefontinst )
add_subdirectory( access ) add_subdirectory( access )
add_subdirectory( hwmanager )
tde_conditional_add_subdirectory( WITH_XRANDR displayconfig ) tde_conditional_add_subdirectory( WITH_XRANDR displayconfig )
tde_conditional_add_subdirectory( WITH_TDEHWLIB hwmanager )
tde_conditional_add_subdirectory( WITH_SAMBA samba ) tde_conditional_add_subdirectory( WITH_SAMBA samba )
tde_conditional_add_subdirectory( WITH_XRANDR randr ) tde_conditional_add_subdirectory( WITH_XRANDR randr )
tde_conditional_add_subdirectory( WITH_LIBRAW1394 view1394 ) tde_conditional_add_subdirectory( WITH_LIBRAW1394 view1394 )

@ -57,6 +57,9 @@
#include "displayconfig.h" #include "displayconfig.h"
using namespace std; using namespace std;
#ifdef __OpenBSD__
#define abs __gnu_cxx::abs
#endif
/**** DLL Interface ****/ /**** DLL Interface ****/
typedef KGenericFactory<KDisplayConfig, TQWidget> KDisplayCFactory; typedef KGenericFactory<KDisplayConfig, TQWidget> KDisplayCFactory;
@ -742,8 +745,10 @@ void KDisplayConfig::setRealResolutionSliderValue(int index) {
KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStringList &) KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStringList &)
: TDECModule(KDisplayCFactory::instance(), parent, name), iccTab(0), numberOfProfiles(0), numberOfScreens(0), m_randrsimple(0), activeProfileName(""), m_gammaApplyTimer(0) : TDECModule(KDisplayCFactory::instance(), parent, name), iccTab(0), numberOfProfiles(0), numberOfScreens(0), m_randrsimple(0), activeProfileName(""), m_gammaApplyTimer(0)
{ {
#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*))); connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
#endif
m_randrsimple = new KRandrSimpleAPI(); m_randrsimple = new KRandrSimpleAPI();
@ -859,6 +864,7 @@ KDisplayConfig::~KDisplayConfig()
} }
void KDisplayConfig::deviceChanged (TDEGenericDevice* device) { void KDisplayConfig::deviceChanged (TDEGenericDevice* device) {
#ifdef __TDE_HAVE_TDEHWLIB
if (device->type() == TDEGenericDeviceType::Monitor) { if (device->type() == TDEGenericDeviceType::Monitor) {
if (base->rescanHardware->isEnabled()) { if (base->rescanHardware->isEnabled()) {
base->rescanHardware->setEnabled(false); base->rescanHardware->setEnabled(false);
@ -866,6 +872,7 @@ void KDisplayConfig::deviceChanged (TDEGenericDevice* device) {
base->rescanHardware->setEnabled(true); base->rescanHardware->setEnabled(true);
} }
} }
#endif
} }
void KDisplayConfig::updateExtendedMonitorInformation () { void KDisplayConfig::updateExtendedMonitorInformation () {

@ -35,7 +35,11 @@
#include <dcopobject.h> #include <dcopobject.h>
#include <libtderandr/libtderandr.h> #include <libtderandr/libtderandr.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#else
#define TDEGenericDevice void
#endif
#include "monitorworkspace.h" #include "monitorworkspace.h"
#include "displayconfigbase.h" #include "displayconfigbase.h"

@ -92,8 +92,10 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
applyIccConfiguration(cur_profile, NULL); applyIccConfiguration(cur_profile, NULL);
} }
#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*))); connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
#endif
} }
/*! /*!
@ -886,6 +888,7 @@ void KRandRSystemTray::slotOutputChanged(int parameter)
} }
void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) { void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) {
#ifdef __TDE_HAVE_TDEHWLIB
if (device->type() == TDEGenericDeviceType::Monitor) { if (device->type() == TDEGenericDeviceType::Monitor) {
KRandrPassivePopup::message( KRandrPassivePopup::message(
i18n("New display output options are available!"), i18n("New display output options are available!"),
@ -895,6 +898,7 @@ void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) {
reloadDisplayConfiguration(); reloadDisplayConfiguration();
applyHotplugRules(locateLocal("config", "/", true)); applyHotplugRules(locateLocal("config", "/", true));
} }
#endif
} }
void KRandRSystemTray::slotHelpContents() void KRandRSystemTray::slotHelpContents()

@ -25,7 +25,11 @@
#include <kglobalaccel.h> #include <kglobalaccel.h>
#include <libtderandr/libtderandr.h> #include <libtderandr/libtderandr.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#else
#define TDEGenericDevice void
#endif
class KHelpMenu; class KHelpMenu;
class TDEPopupMenu; class TDEPopupMenu;

@ -52,7 +52,9 @@
#include <kdebug.h> #include <kdebug.h>
#include <tdeglobal.h> #include <tdeglobal.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif
#include <kiconloader.h> #include <kiconloader.h>
#include <klineedit.h> #include <klineedit.h>
#include <tdelocale.h> #include <tdelocale.h>
@ -93,7 +95,13 @@
#include "flipscrollview.h" #include "flipscrollview.h"
#include "itemview.h" #include "itemview.h"
#include <dmctl.h> #include <dmctl.h>
#ifdef __OpenBSD__
#include <sys/statvfs.h>
#include <sys/param.h>
#include <sys/mount.h>
#else
#include <sys/vfs.h> #include <sys/vfs.h>
#endif
#include <mykickoffsearchinterface.h> #include <mykickoffsearchinterface.h>
#include "media_watcher.h" #include "media_watcher.h"
@ -1359,10 +1367,10 @@ void KMenu::insertStaticExitItems()
} }
bool maysd = false; bool maysd = false;
#ifdef COMPILE_HALBACKEND #if defined(COMPILE_HALBACKEND)
if (ksmserver.readBoolEntry( "offerShutdown", true ) && DM().canShutdown()) if (ksmserver.readBoolEntry( "offerShutdown", true ) && DM().canShutdown())
maysd = true; maysd = true;
#else #elif defined(__TDE_HAVE_TDEHWLIB)
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice(); TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if( rootDevice ) { if( rootDevice ) {
maysd = rootDevice->canPowerOff(); maysd = rootDevice->canPowerOff();
@ -3792,7 +3800,7 @@ void KMenu::insertSuspendOption( int &nId, int &index )
bool suspend_freeze = false; bool suspend_freeze = false;
bool standby = false; bool standby = false;
bool suspend_disk = false; bool suspend_disk = false;
#ifdef COMPILE_HALBACKEND #if defined(COMPILE_HALBACKEND)
suspend_ram = libhal_device_get_property_bool(m_halCtx, suspend_ram = libhal_device_get_property_bool(m_halCtx,
"/org/freedesktop/Hal/devices/computer", "/org/freedesktop/Hal/devices/computer",
"power_management.can_suspend", "power_management.can_suspend",
@ -3807,7 +3815,7 @@ void KMenu::insertSuspendOption( int &nId, int &index )
"/org/freedesktop/Hal/devices/computer", "/org/freedesktop/Hal/devices/computer",
"power_management.can_hibernate", "power_management.can_hibernate",
NULL); NULL);
#else // COMPILE_HALBACKEND #elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice(); TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
suspend_ram = rootDevice->canSuspend(); suspend_ram = rootDevice->canSuspend();
@ -3868,7 +3876,7 @@ void KMenu::slotSuspend(int id)
DCOPRef("kdesktop", "KScreensaverIface").call("lock()"); DCOPRef("kdesktop", "KScreensaverIface").call("lock()");
} }
#ifdef COMPILE_HALBACKEND #if defined(COMPILE_HALBACKEND)
DBusMessage* msg = NULL; DBusMessage* msg = NULL;
if (m_dbusConn) { if (m_dbusConn) {
@ -3901,7 +3909,7 @@ void KMenu::slotSuspend(int id)
} }
dbus_message_unref(msg); dbus_message_unref(msg);
} }
#else // COMPILE_HALBACKEND #elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice(); TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
if (id == 1) { if (id == 1) {
@ -3916,10 +3924,12 @@ void KMenu::slotSuspend(int id)
return; return;
} }
} }
#else
error = false;
#endif #endif
if (error) if (error) {
KMessageBox::error(this, i18n("Suspend failed")); KMessageBox::error(this, i18n("Suspend failed"));
}
} }
void KMenu::runUserCommand() void KMenu::runUserCommand()

@ -598,7 +598,9 @@ KSMServer::KSMServer( const TQString& windowManager, const TQString& windowManag
clientInteracting = 0; clientInteracting = 0;
xonCommand = config->readEntry( "xonCommand", "xon" ); xonCommand = config->readEntry( "xonCommand", "xon" );
#ifdef __TDE_HAVE_TDEHWLIB
hwDevices = TDEGlobal::hardwareDevices(); hwDevices = TDEGlobal::hardwareDevices();
#endif
connect( &knotifyTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( knotifyTimeout())); connect( &knotifyTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( knotifyTimeout()));
connect( &startupSuspendTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( startupSuspendTimeout())); connect( &startupSuspendTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( startupSuspendTimeout()));
@ -720,6 +722,7 @@ void KSMServer::cleanUp()
DM().shutdown( shutdownType, shutdownMode, bootOption ); DM().shutdown( shutdownType, shutdownMode, bootOption );
} }
else { else {
#ifdef __TDE_HAVE_TDEHWLIB
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
if (shutdownType == TDEApplication::ShutdownTypeHalt) { if (shutdownType == TDEApplication::ShutdownTypeHalt) {
@ -729,6 +732,7 @@ void KSMServer::cleanUp()
rootDevice->setPowerState(TDESystemPowerState::Reboot); rootDevice->setPowerState(TDESystemPowerState::Reboot);
} }
} }
#endif
} }
} }

@ -23,7 +23,9 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#include <tqtimer.h> #include <tqtimer.h>
#include <dcopobject.h> #include <dcopobject.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif
#include "server2.h" #include "server2.h"
@ -251,7 +253,9 @@ private:
WindowMap legacyWindows; WindowMap legacyWindows;
#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices* hwDevices; TDEHardwareDevices* hwDevices;
#endif
int initialClientCount; int initialClientCount;
int phase2ClientCount; int phase2ClientCount;
int protectionTimerCounter; int protectionTimerCounter;

@ -152,6 +152,7 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd, bool &mayrb,
mayrb = true; mayrb = true;
} }
else { else {
#ifdef __TDE_HAVE_TDEHWLIB
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
if (rootDevice->canPowerOff()) { if (rootDevice->canPowerOff()) {
@ -161,6 +162,7 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd, bool &mayrb,
mayrb = true; mayrb = true;
} }
} }
#endif
} }
} }
if (!maysd) { if (!maysd) {
@ -239,6 +241,7 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm,
// If this is not done the desktop of the locked session will be shown after suspend/hibernate until the lock fully engages! // If this is not done the desktop of the locked session will be shown after suspend/hibernate until the lock fully engages!
kapp->dcopClient()->call("kdesktop", "KScreensaverIface", "lock()", TQCString(""), replyType, replyData); kapp->dcopClient()->call("kdesktop", "KScreensaverIface", "lock()", TQCString(""), replyType, replyData);
} }
#ifdef __TDE_HAVE_TDEHWLIB
TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice(); TDERootSystemDevice* rootDevice = hwDevices->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
if (selection == 1) { // Suspend if (selection == 1) { // Suspend
@ -251,6 +254,7 @@ void KSMServer::shutdownInternal( TDEApplication::ShutdownConfirm confirm,
rootDevice->setPowerState(TDESystemPowerState::Freeze); rootDevice->setPowerState(TDESystemPowerState::Freeze);
} }
} }
#endif
} }
} }

@ -33,7 +33,9 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#include <tdelocale.h> #include <tdelocale.h>
#include <tdeconfig.h> #include <tdeconfig.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif
#include <kdebug.h> #include <kdebug.h>
#include <kpushbutton.h> #include <kpushbutton.h>
#include <kstdguiitem.h> #include <kstdguiitem.h>
@ -805,7 +807,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
bool canSuspend = false; bool canSuspend = false;
bool canHibernate = false; bool canHibernate = false;
#ifdef COMPILE_HALBACKEND #if defined(COMPILE_HALBACKEND)
// Query HAL for suspend/resume support // Query HAL for suspend/resume support
m_halCtx = libhal_ctx_new(); m_halCtx = libhal_ctx_new();
@ -860,7 +862,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
canHibernate = true; canHibernate = true;
} }
} }
#else // COMPILE_HALBACKEND #elif defined(__TDE_HAVE_TDEHWLIB) // COMPILE_HALBACKEND
TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice(); TDERootSystemDevice* rootDevice = TDEGlobal::hardwareDevices()->rootSystemDevice();
if (rootDevice) { if (rootDevice) {
canFreeze = rootDevice->canFreeze(); canFreeze = rootDevice->canFreeze();

@ -3,7 +3,7 @@
# A script to perform R14.0.0 XDG compliance updates. # A script to perform R14.0.0 XDG compliance updates.
SCRIPT_NAME="`basename \`readlink -f $0\``" SCRIPT_NAME="`basename \`readlink -f $0\``"
SCRIPT_VERSION=201407050 SCRIPT_VERSION=201410170
# This script should be needed to run only once, but corner cases # This script should be needed to run only once, but corner cases
# and file/directory permissions could cause incomplete updates. # and file/directory permissions could cause incomplete updates.
@ -608,6 +608,14 @@ if [ "$R14_VERSION" -lt "201310050" ]; then
fi fi
fi fi
# Update TDENewStuff
if [ "$R14_VERSION" -lt "201410170" ]; then
Log "Updating TDENewStuff providers and status."
find "$PROFILE_DIR"/share/config -type f -print0 2>/dev/null | \
xargs -r0 grep -ZIEl "^\[KNewStuff" | \
xargs -r0 sed -i -e "/^\[KNewStuff/,/^\[|$/{" -e "s|^\[KNewStuff|[TDENewStuff|" -e "s|^ProvidersUrl=[^ ]*|ProvidersUrl=https://www.trinitydesktop.org/ocs/providers.xml|" -e "}"
fi
Log "Renaming some configuration files and directories." Log "Renaming some configuration files and directories."
# Note: The only rebranding that occured before starting the R14 branch was krita. All other # Note: The only rebranding that occured before starting the R14 branch was krita. All other
# rebranding updates belong in this script. # rebranding updates belong in this script.

@ -11,6 +11,12 @@
if( WITH_SASL ) if( WITH_SASL )
check_include_file( "sasl/sasl.h" HAVE_SASL_SASL_H ) check_include_file( "sasl/sasl.h" HAVE_SASL_SASL_H )
if( NOT HAVE_SASL_SASL_H )
find_path( SASL_H_PATH "sasl/sasl.h" )
if( SASL_H_PATH )
set( HAVE_SASL_SASL_H "1" )
endif( )
endif( )
check_library_exists( sasl2 sasl_client_init "" HAVE_LIBSASL2 ) check_library_exists( sasl2 sasl_client_init "" HAVE_LIBSASL2 )
if( HAVE_SASL_SASL_H AND HAVE_LIBSASL2 ) if( HAVE_SASL_SASL_H AND HAVE_LIBSASL2 )
set( SASL_LIBRARIES sasl2 ) set( SASL_LIBRARIES sasl2 )

@ -2707,6 +2707,7 @@ static const char *section_list[] = {
"3L", "Lightweight Processes Library", "3L", "Lightweight Processes Library",
"3M", "Mathematical Library", "3M", "Mathematical Library",
"3N", "Network Functions", "3N", "Network Functions",
"3p", "Perl Functions",
"3R", "RPC Services Library", "3R", "RPC Services Library",
"3S", "Standard I/O Functions", "3S", "Standard I/O Functions",
"3V", "C Library Functions", "3V", "C Library Functions",
@ -5482,16 +5483,17 @@ static char *scan_troff_mandoc(char *c, bool san, char **result)
end++; end++;
} }
if (end > c + 2 if (end >= c + 2
&& ispunct(*(end - 1)) && ispunct(*(end - 1))
&& isspace(*(end - 2)) && *(end - 2) != '\n') { && isspace(*(end - 2)) && *(end - 2) != '\n') {
/* Don't format lonely punctuation E.g. in "xyz ," format /* Don't format lonely punctuation E.g. in "xyz ," format
* the xyz and then append the comma removing the space. * the xyz and then append the comma removing the space.
*/ */
*(end - 2) = '\n'; *(end - 2) = 0;
ret = scan_troff(c, san, result); (void)scan_troff(c, 0, result);
*(end - 2) = *(end - 1); ret = end-2;
*(end - 1) = ' '; *(end-2)=*(end-1);
*(end-1)=' ';
} }
else { else {
ret = scan_troff(c, san, result); ret = scan_troff(c, san, result);

@ -36,30 +36,21 @@ install( FILES mediamanager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded )
set( target kded_mediamanager ) set( target kded_mediamanager )
if( WITH_HAL ) if( WITH_HAL )
set( ${target}_SRCS set( HAL_MEDIA_BACKEND halbackend.cpp linuxcdpolling.cpp )
mediamanager.cpp mediamanager.skel medialist.cpp set( HAL_MEDIA_LIBRARIES ${HAL_LIBRARIES} -lhal-storage ${DBUS_TQT_LIBRARIES} )
backendbase.cpp fstabbackend.cpp removablebackend.cpp endif( )
mediadirnotify.cpp mediadirnotify.skel
decryptdialog.ui dialog.cpp
halbackend.cpp linuxcdpolling.cpp tdehardwarebackend.cpp
)
tde_add_kpart( ${target} AUTOMOC if( WITH_TDEHWLIB )
SOURCES ${${target}_SRCS} set( TDEHWBACKEND tdehardwarebackend.cpp )
LINK mediacommon-static tdeinit_kded-shared ${HAL_LIBRARIES} -lhal-storage ${DBUS_TQT_LIBRARIES} endif( WITH_TDEHWLIB )
DESTINATION ${PLUGIN_INSTALL_DIR}
) tde_add_kpart( ${target} AUTOMOC
else( ) SOURCES
set( ${target}_SRCS
mediamanager.cpp mediamanager.skel medialist.cpp mediamanager.cpp mediamanager.skel medialist.cpp
backendbase.cpp fstabbackend.cpp removablebackend.cpp backendbase.cpp fstabbackend.cpp removablebackend.cpp
decryptdialog.ui dialog.cpp decryptdialog.ui dialog.cpp
mediadirnotify.cpp mediadirnotify.skel tdehardwarebackend.cpp mediadirnotify.cpp mediadirnotify.skel
) ${HAL_MEDIA_BACKEND} ${TDEHWBACKEND}
LINK mediacommon-static tdeinit_kded-shared ${HAL_MEDIA_LIBRARIES}
tde_add_kpart( ${target} AUTOMOC DESTINATION ${PLUGIN_INSTALL_DIR}
SOURCES ${${target}_SRCS} )
LINK mediacommon-static tdeinit_kded-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
endif( )

@ -19,7 +19,13 @@
#include "medianotifier.h" #include "medianotifier.h"
#ifdef __OpenBSD__
#include <sys/statvfs.h>
#include <sys/param.h>
#include <sys/mount.h>
#else
#include <sys/vfs.h> #include <sys/vfs.h>
#endif
#include <tqfile.h> #include <tqfile.h>
#include <tqfileinfo.h> #include <tqfileinfo.h>

@ -28,7 +28,9 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif
#include "actionlistboxitem.h" #include "actionlistboxitem.h"
#include "notificationdialogview.h" #include "notificationdialogview.h"

@ -33,7 +33,9 @@
#include <kprocess.h> #include <kprocess.h>
#include <tdestartupinfo.h> #include <tdestartupinfo.h>
#include <kmimetype.h> #include <kmimetype.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#endif
#include "dialog.h" #include "dialog.h"
#include "tdeio_media_mounthelper.h" #include "tdeio_media_mounthelper.h"
@ -187,6 +189,7 @@ MountHelper::MountHelper() : TDEApplication()
void MountHelper::invokeEject(const TQString &device, bool quiet) void MountHelper::invokeEject(const TQString &device, bool quiet)
{ {
#ifdef __TDE_HAVE_TDEHWLIB
// Try TDE HW library eject first... // Try TDE HW library eject first...
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
TDEGenericDevice *hwdevice = hwdevices->findByDeviceNode(device); TDEGenericDevice *hwdevice = hwdevices->findByDeviceNode(device);
@ -197,6 +200,7 @@ void MountHelper::invokeEject(const TQString &device, bool quiet)
::exit(0); ::exit(0);
} }
} }
#endif
// Then fall back to tdeeject if needed // Then fall back to tdeeject if needed
TDEProcess *proc = new TDEProcess(TQT_TQOBJECT(this)); TDEProcess *proc = new TDEProcess(TQT_TQOBJECT(this));

@ -33,6 +33,9 @@
#ifdef HAVE_STATVFS #ifdef HAVE_STATVFS
# include <sys/statvfs.h> # include <sys/statvfs.h>
#else #else
# ifdef __OpenBSD__
# include <sys/param.h>
# endif
# include <sys/mount.h> # include <sys/mount.h>
# define statvfs statfs # define statvfs statfs
# define f_frsize f_bsize # define f_frsize f_bsize

@ -45,7 +45,9 @@
#include <pwd.h> #include <pwd.h>
#include <errno.h> #include <errno.h>
#ifndef __OpenBSD__
#include <sys/prctl.h> #include <sys/prctl.h>
#endif
#include <sys/time.h> #include <sys/time.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
@ -249,7 +251,9 @@ int create_socket()
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#ifndef __OpenBSD__
prctl(PR_SET_DUMPABLE, 0); prctl(PR_SET_DUMPABLE, 0);
#endif
TDEAboutData aboutData("tdesud", I18N_NOOP("TDE su daemon"), TDEAboutData aboutData("tdesud", I18N_NOOP("TDE su daemon"),
Version, I18N_NOOP("Daemon used by tdesu"), Version, I18N_NOOP("Daemon used by tdesu"),

@ -27,16 +27,6 @@ check_function_exists( login_getclass HAVE_LOGIN_GETCLASS )
check_function_exists( auth_timeok HAVE_AUTH_TIMEOK ) check_function_exists( auth_timeok HAVE_AUTH_TIMEOK )
tde_restore( CMAKE_REQUIRED_LIBRARIES ) tde_restore( CMAKE_REQUIRED_LIBRARIES )
check_function_exists( crypt LIBC_HAVE_CRYPT )
if( LIBC_HAVE_CRYPT )
set( HAVE_CRYPT 1 CACHE INTERNAL "" FORCE )
else( )
check_library_exists( crypt crypt "" HAVE_CRYPT )
if( HAVE_CRYPT )
set( CRYPT_LIBRARY crypt )
endif( )
endif( )
check_include_file( lastlog.h HAVE_LASTLOG_H ) check_include_file( lastlog.h HAVE_LASTLOG_H )
check_include_file( termio.h HAVE_TERMIO_H ) check_include_file( termio.h HAVE_TERMIO_H )
@ -95,7 +85,7 @@ unset( BSD_UTMP )
if( NOT HAVE_UTMPX ) if( NOT HAVE_UTMPX )
check_function_exists( getutent have_getutent ) check_function_exists( getutent have_getutent )
if( NOT have_getutent ) if( NOT have_getutent )
set( BSD_UTMP 1 ) set( BSD_UTMP 1 CACHE INTERNAL "" FORCE )
endif( ) endif( )
endif( ) endif( )

@ -41,6 +41,9 @@ from the copyright holder.
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h> #include <stdlib.h>
#ifdef __OpenBSD__
#include <pwd.h>
#endif
#include <sys/ioctl.h> #include <sys/ioctl.h>
@ -290,6 +293,26 @@ SaveServerAuthorizations( struct display *d, Xauth **auths, int count )
return FALSE; return FALSE;
} }
} }
#ifdef __OpenBSD__
{
struct passwd *x11;
uid_t uid;
gid_t gid;
/* Give read capability to group _x11 */
x11 = getpwnam("_x11");
if (x11 == NULL) {
LogError("Can't find _x11 user\n");
uid = getuid();
gid = getgid();
} else {
uid = x11->pw_uid;
gid = x11->pw_gid;
}
fchown(fileno(auth_file), uid, gid);
}
#endif
Debug( "file: %s auth: %p\n", d->authFile, auths ); Debug( "file: %s auth: %p\n", d->authFile, auths );
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
/* /*

@ -22,8 +22,12 @@ is_a_console(int fd) {
char arg; char arg;
arg = 0; arg = 0;
#ifdef __OpenBSD__
return arg;
#else
return (ioctl(fd, KDGKBTYPE, &arg) == 0 return (ioctl(fd, KDGKBTYPE, &arg) == 0
&& ((arg == KB_101) || (arg == KB_84))); && ((arg == KB_101) || (arg == KB_84)));
#endif
} }
static int static int

@ -123,11 +123,14 @@ void GreeterApp::init()
startTimer( pingInterval * 60000 ); startTimer( pingInterval * 60000 );
} }
#ifdef __TDE_HAVE_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*))); connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
#endif
} }
void GreeterApp::deviceChanged(TDEGenericDevice* device) { void GreeterApp::deviceChanged(TDEGenericDevice* device) {
#ifdef __TDE_HAVE_TDEHWLIB
#ifdef WITH_XRANDR #ifdef WITH_XRANDR
if (device->type() == TDEGenericDeviceType::Monitor) { if (device->type() == TDEGenericDeviceType::Monitor) {
KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI(); KRandrSimpleAPI *randrsimple = new KRandrSimpleAPI();
@ -135,6 +138,7 @@ void GreeterApp::deviceChanged(TDEGenericDevice* device) {
delete randrsimple; delete randrsimple;
} }
#endif // WITH_XRANDR #endif // WITH_XRANDR
#endif // __TDE_HAVE_TDEHWLIB
} }
void void

@ -27,7 +27,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define KGAPP_H #define KGAPP_H
#include <tdeapplication.h> #include <tdeapplication.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#else
#define TDEGenericDevice void
#endif
class GreeterApp : public TDEApplication { class GreeterApp : public TDEApplication {
Q_OBJECT Q_OBJECT

@ -71,7 +71,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
#include <utmp.h> #include <utmp.h>
#ifdef HAVE_UTMPX
#include <utmpx.h> #include <utmpx.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -1294,13 +1296,14 @@ void ControlPipeHandlerObject::run(void) {
umask(0); umask(0);
struct stat buffer; struct stat buffer;
int status; int status;
char *fifo_parent_dir = strdup(FIFO_DIR); char *fifo_parent_dir;
dirname(fifo_parent_dir); char *fifo_dir = strdup(FIFO_DIR);
fifo_parent_dir = dirname(fifo_dir);
status = stat(fifo_parent_dir, &buffer); status = stat(fifo_parent_dir, &buffer);
if (status != 0) { if (status != 0) {
mkdir(fifo_parent_dir, 0644); mkdir(fifo_parent_dir, 0755);
} }
free(fifo_parent_dir); free(fifo_dir);
status = stat(FIFO_DIR, &buffer); status = stat(FIFO_DIR, &buffer);
if (status == 0) { if (status == 0) {
int file_mode = ((buffer.st_mode & S_IRWXU) >> 6) * 100; int file_mode = ((buffer.st_mode & S_IRWXU) >> 6) * 100;
@ -1313,7 +1316,7 @@ void ControlPipeHandlerObject::run(void) {
return; return;
} }
} }
mkdir(FIFO_DIR,0600); mkdir(FIFO_DIR,0700);
mknod(mPipeFilename.ascii(), S_IFIFO|0600, 0); mknod(mPipeFilename.ascii(), S_IFIFO|0600, 0);
chmod(mPipeFilename.ascii(), 0600); chmod(mPipeFilename.ascii(), 0600);

@ -389,9 +389,11 @@ typedef void (*f_CopySubBuffer) (Display *dpy, GLXDrawable drawable, int x, int
#ifdef CONFIG_GLX_SYNC #ifdef CONFIG_GLX_SYNC
// Looks like duplicate typedef of the same type is safe? // Looks like duplicate typedef of the same type is safe?
#ifndef __OpenBSD__
typedef int64_t GLint64; typedef int64_t GLint64;
typedef uint64_t GLuint64; typedef uint64_t GLuint64;
typedef struct __GLsync *GLsync; typedef struct __GLsync *GLsync;
#endif
#ifndef GL_SYNC_FLUSH_COMMANDS_BIT #ifndef GL_SYNC_FLUSH_COMMANDS_BIT
#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 #define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001

Loading…
Cancel
Save