rpms/mingw32-plib/F-12 import.log, NONE, 1.1 mingw32-plib.spec, NONE, 1.1 plib-1.8.4-autorepeat.patch, NONE, 1.1 plib-1.8.4-fullscreen.patch, NONE, 1.1 plib-shared-lib.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
stefanriemens
stefanriemens at fedoraproject.org
Fri Nov 27 14:42:54 UTC 2009
Author: stefanriemens
Update of /cvs/pkgs/rpms/mingw32-plib/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13191/F-12
Modified Files:
.cvsignore sources
Added Files:
import.log mingw32-plib.spec plib-1.8.4-autorepeat.patch
plib-1.8.4-fullscreen.patch plib-shared-lib.patch
Log Message:
* Fri Nov 27 2009 Stefan Riemens <fgfs.stefan at gmail.com> - 1.8.5-0
- Initial release
--- NEW FILE import.log ---
mingw32-plib-1_8_5-0_fc12:F-12:mingw32-plib-1.8.5-0.fc12.src.rpm:1259333009
--- NEW FILE mingw32-plib.spec ---
%global __strip %{_mingw32_strip}
%global __objdump %{_mingw32_objdump}
%global _use_internal_dependency_generator 0
%global __find_requires %{_mingw32_findrequires}
%global __find_provides %{_mingw32_findprovides}
Name: mingw32-plib
Version: 1.8.5
Release: 0%{?dist}
Summary: Fedora mingw set of portable game related libraries
Group: Development/Libraries
License: LGPLv2+
URL: http://plib.sourceforge.net/
Source: http://plib.sourceforge.net/dist/plib-%{version}.tar.gz
# native's package patches
Patch1: plib-1.8.4-fullscreen.patch
Patch3: plib-1.8.4-autorepeat.patch
#mingw specific patches:
Patch100: plib-shared-lib.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 35
BuildRequires: mingw32-gcc
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-binutils
BuildRequires: mingw32-freeglut
BuildRequires: mingw32-libpng
#autotools are run
BuildRequires: automake
BuildRequires: libtool
%description
This is a set of OpenSource (LGPL) libraries that will permit programmers
to write games and other realtime interactive applications that are 100%
portable across a wide range of hardware and operating systems. Here is
what you need - it's all free and available with LGPL'ed source code on
the web. All of it works well together.
%{_mingw32_description}
%package static
Summary: Static version of Fedora mingw set of portable game related libraries
Requires: %{name} = {version}-{release}
Group: Development/Libraries
%description static
Static version of Fedora mingw set of portable game related libraries
%{_mingw32_debug_package}
%prep
%setup -q -n plib-%{version}
%patch1 -p1 -b .fs
%patch3 -p1 -b .autorepeat
%patch100 -p0
# for some reason this file has its x permission sets, which makes rpmlint cry
chmod -x src/sg/sgdIsect.cxx
%build
libtoolize
./autogen.sh
%_mingw32_configure --enable-static --enable-shared
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_mingw32_libdir}/libplib*.la
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NOTICE README
%{_mingw32_libdir}/libplibul.dll.a
%{_mingw32_libdir}/libplibssgaux.dll.a
%{_mingw32_libdir}/libplibssg.dll.a
%{_mingw32_libdir}/libplibsm.dll.a
%{_mingw32_libdir}/libplibsl.dll.a
%{_mingw32_libdir}/libplibsg.dll.a
%{_mingw32_libdir}/libplibpw.dll.a
%{_mingw32_libdir}/libplibpuaux.dll.a
%{_mingw32_libdir}/libplibpu.dll.a
%{_mingw32_libdir}/libplibpsl.dll.a
%{_mingw32_libdir}/libplibnet.dll.a
%{_mingw32_libdir}/libplibjs.dll.a
%{_mingw32_libdir}/libplibfnt.dll.a
%{_mingw32_includedir}/plib
%{_mingw32_bindir}/libplibul-0.dll
%{_mingw32_bindir}/libplibssgaux-0.dll
%{_mingw32_bindir}/libplibssg-0.dll
%{_mingw32_bindir}/libplibsm-0.dll
%{_mingw32_bindir}/libplibsl-0.dll
%{_mingw32_bindir}/libplibsg-0.dll
%{_mingw32_bindir}/libplibpw-0.dll
%{_mingw32_bindir}/libplibpuaux-0.dll
%{_mingw32_bindir}/libplibpu-0.dll
%{_mingw32_bindir}/libplibpsl-0.dll
%{_mingw32_bindir}/libplibnet-0.dll
%{_mingw32_bindir}/libplibjs-0.dll
%{_mingw32_bindir}/libplibfnt-0.dll
%files static
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog NOTICE README
%{_mingw32_libdir}/libplibul.a
%{_mingw32_libdir}/libplibssgaux.a
%{_mingw32_libdir}/libplibssg.a
%{_mingw32_libdir}/libplibsm.a
%{_mingw32_libdir}/libplibsl.a
%{_mingw32_libdir}/libplibsg.a
%{_mingw32_libdir}/libplibpw.a
%{_mingw32_libdir}/libplibpuaux.a
%{_mingw32_libdir}/libplibpu.a
%{_mingw32_libdir}/libplibpsl.a
%{_mingw32_libdir}/libplibnet.a
%{_mingw32_libdir}/libplibjs.a
%{_mingw32_libdir}/libplibfnt.a
%changelog
* Thu Oct 22 2009 Stefan Riemens <fgfs.stefan at gmail.com> - 1.8.5-0
- Initial mingw release
plib-1.8.4-autorepeat.patch:
pwX11.cxx | 46 +++++++++++++++++++++++++++++-----------------
1 file changed, 29 insertions(+), 17 deletions(-)
--- NEW FILE plib-1.8.4-autorepeat.patch ---
--- plib-1.8.4/src/pw/pwX11.cxx.key 2006-10-05 19:56:42.000000000 +0200
+++ plib-1.8.4/src/pw/pwX11.cxx 2006-10-05 20:04:19.000000000 +0200
@@ -117,11 +117,19 @@
static XTextProperty *titlePropertyPtr = NULL;
static bool autoRepeat = false ;
+static bool haveFocus = false ;
static void getEvents ();
void pwSetAutoRepeatKey ( bool enable )
{
+ if ( (autoRepeat != enable) && haveFocus )
+ {
+ if ( enable )
+ XAutoRepeatOn ( currDisplay ) ;
+ else
+ XAutoRepeatOff ( currDisplay ) ;
+ }
autoRepeat = enable ;
}
@@ -351,7 +359,7 @@
KeyPressMask | KeyReleaseMask |
EnterWindowMask | LeaveWindowMask |
PointerMotionMask | ButtonMotionMask |
- VisibilityChangeMask ;
+ VisibilityChangeMask| FocusChangeMask;
attribs.background_pixmap = None ;
attribs.background_pixel = 0 ;
@@ -405,6 +413,10 @@
XMapWindow ( currDisplay, wmWindow ) ;
glXMakeCurrent ( currDisplay, currHandle, currContext ) ;
+ haveFocus = true;
+ if (!autoRepeat)
+ XAutoRepeatOff ( currDisplay ) ;
+
pwSetCursor ( PW_CURSOR_LEFT ) ;
#ifdef GL_MULTISAMPLE_FILTER_HINT_NV
@@ -717,8 +729,6 @@
static void getEvents ()
{
- bool repeating = false ;
- char keyflags [ 32 ] ;
XEvent event ;
insideCallback = true ;
@@ -770,6 +780,18 @@
(*mpCB) ( event.xmotion.x, event.xmotion.y ) ;
break ;
+ case FocusIn:
+ if ( !haveFocus && !autoRepeat )
+ XAutoRepeatOff ( currDisplay ) ;
+ haveFocus = true;
+ break;
+
+ case FocusOut:
+ if ( haveFocus && !autoRepeat )
+ XAutoRepeatOn ( currDisplay ) ;
+ haveFocus = false;
+ break;
+
case ButtonRelease :
updown = PW_UP ;
/* FALLTHROUGH */
@@ -792,23 +814,9 @@
case KeyRelease :
updown = PW_UP ;
-
- XQueryKeymap ( currDisplay, keyflags ) ;
-
- repeating = ( ( keyflags [ event.xkey.keycode >> 3 ] &
- ( 1 << ( event.xkey.keycode & 7 ) ) ) != 0 ) ;
-
/* FALLTHROUGH */
case KeyPress :
- /*
- Only generate a key up callback if the key is actually up
- and not repeating.
- */
-
- if ( ! autoRepeat && repeating )
- break ;
-
XComposeStatus composeStatus ;
char asciiCode [ 32 ] ;
KeySym keySym ;
@@ -1021,10 +1029,14 @@
if ( fsWindow != None )
pwSetWindowed ( ) ;
+ if ( haveFocus && !autoRepeat )
+ XAutoRepeatOn ( currDisplay ) ;
+
glXDestroyContext ( currDisplay, currContext ) ;
XDestroyWindow ( currDisplay, currHandle ) ;
XDestroyWindow ( currDisplay, wmWindow ) ;
XCloseDisplay ( currDisplay ) ;
+ haveFocus = false;
currDisplay = NULL;
}
plib-1.8.4-fullscreen.patch:
pw.h | 5
pwX11.cxx | 482 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 437 insertions(+), 50 deletions(-)
--- NEW FILE plib-1.8.4-fullscreen.patch ---
--- plib-1.8.4/src/pw/pw.h.fs 2004-04-07 01:45:19.000000000 +0200
+++ plib-1.8.4/src/pw/pw.h 2006-05-17 16:03:09.000000000 +0200
@@ -54,6 +54,11 @@
void pwSetCursor ( int c ) ;
void pwCleanup () ;
void pwSetAutoRepeatKey ( bool enable ) ;
+void pwSetResizable ( bool enable ) ;
+void pwSetCursorEx ( int wm, int fs ) ;
+void pwSetFullscreen () ;
+void pwSetWindowed () ;
+void pwToggleFullscreen () ;
#define PW_CURSOR_NONE 0
#define PW_CURSOR_RIGHT 1
--- plib-1.8.4/src/pw/pwX11.cxx.fs 2004-04-07 01:45:19.000000000 +0200
+++ plib-1.8.4/src/pw/pwX11.cxx 2006-05-17 16:06:07.000000000 +0200
@@ -74,14 +74,31 @@
#endif
-static bool initialised = false ;
+/* For XF86VIDMODE Support */
+#ifdef XF86VIDMODE
+#include <X11/extensions/xf86vmode.h>
+
+static struct xf86vidmode_data {
+ int vidmode_available;
+ XF86VidModeModeInfo orig_mode;
+ int orig_viewport_x;
+ int orig_viewport_y;
+} XF86VidModeData = { 1, { 0 }, 0, 0 };
+
+static void xf86_vidmode_init () ;
+#endif
+
static bool insideCallback = false ;
+static bool resizable = true;
+static bool mouse_grabbed = false;
+static bool keyb_grabbed = false;
static int modifiers = 0 ;
static int origin [2] = { 0, 0 } ;
static int size [2] = { 640, 480 } ;
static int currScreen = 0 ;
static int currConnect = 0 ;
-static int currCursor = PW_CURSOR_LEFT ;
+static int wmCursor = PW_CURSOR_LEFT ;
+static int fsCursor = PW_CURSOR_LEFT ;
static pwResizeCB *resizeCB = NULL ;
static pwExitCB *exitCB = NULL ;
@@ -92,12 +110,17 @@
static Display *currDisplay = NULL ;
static XVisualInfo *visualInfo = NULL ;
static Window currHandle ;
+static Window wmWindow ;
+static Window fsWindow = None ;
static GLXContext currContext ;
static Window rootWindow ;
static Atom delWinAtom ;
+static XTextProperty *titlePropertyPtr = NULL;
static bool autoRepeat = false ;
+static void getEvents ();
+
void pwSetAutoRepeatKey ( bool enable )
{
autoRepeat = enable ;
@@ -181,6 +204,41 @@
}
+static void pwRealSetResizable ( bool enable, int width, int height )
+{
+ XSizeHints sizeHints ;
+ XWMHints wmHints ;
+
+ resizable = enable;
+
+ if (resizable)
+ sizeHints.flags = USSize;
+ else
+ sizeHints.flags = PSize | PMinSize | PMaxSize;;
+
+ if ( origin[0] >= 0 && origin[1] >= 0 )
+ sizeHints.flags |= USPosition ;
+
+ sizeHints.x = origin[0] ;
+ sizeHints.y = origin[1] ;
+ sizeHints.width = width ;
+ sizeHints.height = height ;
+ sizeHints.min_width = width ;
+ sizeHints.min_height = height ;
+ sizeHints.base_width = width ;
+ sizeHints.base_height = height ;
+ sizeHints.max_width = width ;
+ sizeHints.max_height = height ;
+
+ wmHints.flags = StateHint;
+ wmHints.initial_state = NormalState ;
+
+ XSetWMProperties ( currDisplay, wmWindow,
+ titlePropertyPtr, titlePropertyPtr, 0, 0,
+ &sizeHints, &wmHints, NULL ) ;
+}
+
+
void pwInit ( int multisample, int num_samples )
{
pwInit ( 0, 0, -1, -1, multisample, "NoName", FALSE, num_samples ) ;
@@ -191,7 +249,7 @@
pwMousePosFunc *mp, pwResizeCB *rcb,
pwExitCB *ecb )
{
- if ( ! initialised )
+ if ( ! currDisplay )
{
fprintf ( stderr, "PW: You must not call pwSetCallbacks before pwInit.\n");
exit ( 1 ) ;
@@ -228,6 +286,7 @@
{
fprintf ( stderr, "PW: GLX extension not available on display '%s'?!?",
XDisplayName ( displayName ) ) ;
+ XCloseDisplay ( currDisplay ) ;
exit ( 1 ) ;
}
@@ -235,6 +294,11 @@
rootWindow = RootWindow ( currDisplay, currScreen ) ;
currConnect = ConnectionNumber ( currDisplay ) ;
delWinAtom = XInternAtom ( currDisplay, "WM_DELETE_WINDOW", 0 ) ;
+ fsWindow = None;
+
+#ifdef XF86VIDMODE
+ xf86_vidmode_init () ;
+#endif
if ( w == -1 ) w = DisplayWidth ( currDisplay, currScreen ) ;
if ( h == -1 ) h = DisplayHeight ( currDisplay, currScreen ) ;
@@ -244,10 +308,8 @@
size [ 0 ] = w ;
size [ 1 ] = h ;
+ static XTextProperty titleProperty ;
XSetWindowAttributes attribs ;
- XTextProperty textProperty ;
- XSizeHints sizeHints ;
- XWMHints wmHints ;
unsigned int mask ;
PixelFormat pf ;
@@ -280,6 +342,7 @@
if ( visualInfo == NULL )
{
fprintf ( stderr, "PW: Unable to open a suitable graphics window,\n" ) ;
+ XCloseDisplay ( currDisplay ) ;
exit ( 1 ) ;
}
}
@@ -300,7 +363,12 @@
mask = CWBackPixmap | CWBorderPixel | CWColormap | CWEventMask;
- currHandle = XCreateWindow ( currDisplay, rootWindow,
+ wmWindow = XCreateWindow ( currDisplay, rootWindow,
+ x, y, w, h, 0, visualInfo->depth,
+ InputOutput, visualInfo->visual,
+ mask, &attribs ) ;
+
+ currHandle = XCreateWindow ( currDisplay, wmWindow,
x, y, w, h, 0, visualInfo->depth,
InputOutput, visualInfo->visual,
mask, &attribs ) ;
@@ -315,19 +383,6 @@
fprintf ( stderr,"PW: That may be bad for performance." ) ;
}
- sizeHints.flags = 0 ;
-
- if ( x >= 0 && y >= 0 )
- sizeHints.flags |= USPosition ;
-
- sizeHints.flags |= USSize ;
-
- sizeHints.x = x ; sizeHints.y = y ;
- sizeHints.width = w ; sizeHints.height = h ;
-
- wmHints.flags = StateHint;
- wmHints.initial_state = NormalState ;
-
PropMotifWmHints hints ;
Atom prop_t ;
Atom prop ;
@@ -338,17 +393,17 @@
prop_t = prop = XInternAtom ( currDisplay, "_MOTIF_WM_HINTS", True ) ;
if ( prop != 0 )
- XChangeProperty ( currDisplay, currHandle, prop, prop_t, 32,
+ XChangeProperty ( currDisplay, wmWindow, prop, prop_t, 32,
PropModeReplace, (unsigned char *) &hints,
PROP_MOTIF_WM_HINTS_ELEMENTS) ;
- XStringListToTextProperty ( (char **) &title, 1, &textProperty ) ;
+ if (XStringListToTextProperty ( (char **) &title, 1, &titleProperty ) )
+ titlePropertyPtr = &titleProperty;
- XSetWMProperties ( currDisplay, currHandle,
- &textProperty, &textProperty, 0, 0,
- &sizeHints, &wmHints, NULL ) ;
- XSetWMProtocols ( currDisplay, currHandle, &delWinAtom , 1 );
+ pwRealSetResizable ( true, w, h );
+ XSetWMProtocols ( currDisplay, wmWindow, &delWinAtom , 1 );
XMapWindow ( currDisplay, currHandle ) ;
+ XMapWindow ( currDisplay, wmWindow ) ;
glXMakeCurrent ( currDisplay, currHandle, currContext ) ;
pwSetCursor ( PW_CURSOR_LEFT ) ;
@@ -357,13 +412,14 @@
glHint ( GL_MULTISAMPLE_FILTER_HINT_NV, multisample ) ;
#endif
+ atexit( pwCleanup ) ;
+
kbCB = NULL ;
msCB = NULL ;
mpCB = NULL ;
resizeCB = NULL ;
exitCB = defaultExitFunc ;
- initialised = true ;
insideCallback = false ;
glClear ( GL_COLOR_BUFFER_BIT ) ;
@@ -373,6 +429,14 @@
}
+void pwSetResizable ( bool enable )
+{
+ /* Make sure we get any last resize events before doing this */
+ getEvents();
+ pwRealSetResizable ( enable, size[0], size[1] ) ;
+}
+
+
void pwGetSize ( int *w, int *h )
{
if ( w ) *w = size[0] ;
@@ -380,17 +444,19 @@
}
-void pwSetCursor ( int c )
+void pwRealSetCursor ( int c )
{
+ int newCursor;
+
switch ( c )
{
- case PW_CURSOR_RIGHT : currCursor = XC_right_ptr ; break ;
- case PW_CURSOR_LEFT : currCursor = XC_left_ptr ; break ;
- case PW_CURSOR_QUERY : currCursor = XC_question_arrow ; break ;
- case PW_CURSOR_AIM : currCursor = XC_target ; break ;
- case PW_CURSOR_CIRCLE : currCursor = XC_circle ; break ;
- case PW_CURSOR_WAIT : currCursor = XC_watch ; break ;
- case PW_CURSOR_CROSS : currCursor = XC_crosshair ; break ;
+ case PW_CURSOR_RIGHT : newCursor = XC_right_ptr ; break ;
+ case PW_CURSOR_LEFT : newCursor = XC_left_ptr ; break ;
+ case PW_CURSOR_QUERY : newCursor = XC_question_arrow ; break ;
+ case PW_CURSOR_AIM : newCursor = XC_target ; break ;
+ case PW_CURSOR_CIRCLE : newCursor = XC_circle ; break ;
+ case PW_CURSOR_WAIT : newCursor = XC_watch ; break ;
+ case PW_CURSOR_CROSS : newCursor = XC_crosshair ; break ;
case PW_CURSOR_NONE :
default:
@@ -406,36 +472,231 @@
XCreatePixmapCursor ( currDisplay,
pix, pix, &bcol, &bcol, 0, 0 ) ) ;
XFreePixmap ( currDisplay, pix ) ;
-
- currCursor = 0 ;
}
return ;
}
XDefineCursor( currDisplay, currHandle,
- XCreateFontCursor ( currDisplay, currCursor ) ) ;
+ XCreateFontCursor ( currDisplay, newCursor ) ) ;
}
-void pwSetSize ( int w, int h )
+void pwSetCursor ( int c )
+{
+ pwRealSetCursor (c);
+ wmCursor = c;
+ fsCursor = c;
+}
+
+
+void pwSetCursorEx ( int wm, int fs )
{
+ if (fsWindow == None)
+ pwRealSetCursor (wm);
+ else
+ pwRealSetCursor (fs);
+ wmCursor = wm;
+ fsCursor = fs;
+}
+
+
+#ifdef XF86VIDMODE
+static void
+xf86_vidmode_init ( void )
+{
+ int i,j;
+ XF86VidModeModeLine *l = (XF86VidModeModeLine *)((char *)
+ &XF86VidModeData.orig_mode + sizeof XF86VidModeData.orig_mode.dotclock);
+
+ if (!XF86VidModeQueryVersion(currDisplay, &i, &j))
+ XF86VidModeData.vidmode_available = 0;
+ else if (!XF86VidModeQueryExtension(currDisplay, &i, &j))
+ XF86VidModeData.vidmode_available = 0;
+ else if (!XF86VidModeGetModeLine(currDisplay, currScreen,
+ (int *)&XF86VidModeData.orig_mode.dotclock, l))
+ XF86VidModeData.vidmode_available = 0;
+ else if (!XF86VidModeGetViewPort(currDisplay, currScreen,
+ &XF86VidModeData.orig_viewport_x,
+ &XF86VidModeData.orig_viewport_y))
+ XF86VidModeData.vidmode_available = 0;
+
+ if (!XF86VidModeData.vidmode_available)
+ fprintf(stderr, "Warning: XF86VidMode not available\n");
+}
+
+
+/* qsort comparison function for sorting the modes */
+static int cmpmodes(const void *va, const void *vb)
+{
+ const XF86VidModeModeInfo *a = *(const XF86VidModeModeInfo **)va;
+ const XF86VidModeModeInfo *b = *(const XF86VidModeModeInfo **)vb;
+ if ( a->hdisplay == b->hdisplay )
+ return b->vdisplay - a->vdisplay;
+ else
+ return b->hdisplay - a->hdisplay;
+}
+
+
+static void pwXf86VmSetFullScreenResolution (int desired_width,
+ int desired_height, int &result_width, int &result_height)
+{
+ int i;
+ XF86VidModeModeLine mode ; /* = { .hdisplay = 0, .privsize = 0 } ; */
+ XF86VidModeModeInfo **modes;
+ int mode_count;
+
+ /* C++ can't do struct initialization by struct member name? */
+ mode.hdisplay = 0;
+ mode.privsize = 0;
+
+ if ( ! XF86VidModeData.vidmode_available )
+ return;
+
+ /* Try to switch video mode. This must be done after the pointer is
+ grabbed, because otherwise it can be outside the window negating the
+ XF86VidModeSetViewPort. */
+ if (XF86VidModeGetModeLine(currDisplay, currScreen, &i, &mode))
+ {
+ result_width = mode.hdisplay;
+ result_height = mode.vdisplay;
+ }
+
+ /* Get list of modelines. */
+ if (!XF86VidModeGetAllModeLines(currDisplay, currScreen, &mode_count, &modes))
+ mode_count = 0;
+
+ /* Search for an exact matching video mode. */
+ for (i = 0; i < mode_count; i++) {
+ if ((modes[i]->hdisplay == desired_width) &&
+ (modes[i]->vdisplay == desired_height))
+ break;
+ }
+
+ /* Search for a non exact match (smallest bigger res). */
+ if (i == mode_count) {
+ int best_width = 0, best_height = 0;
+ qsort(modes, mode_count, sizeof(void *), cmpmodes);
+ for (i = mode_count-1; i > 0; i--) {
+ if ( ! best_width ) {
+ if ( (modes[i]->hdisplay >= desired_width) &&
+ (modes[i]->vdisplay >= desired_height) ) {
+ best_width = modes[i]->hdisplay;
+ best_height = modes[i]->vdisplay;
+ }
+ } else {
+ if ( (modes[i]->hdisplay != best_width) ||
+ (modes[i]->vdisplay != best_height) ) {
+ i++;
+ break;
+ }
+ }
+ }
+ }
+
+ /* Switch video mode. */
+ if ((i >= 0) &&
+ ((modes[i]->hdisplay != mode.hdisplay) ||
+ (modes[i]->vdisplay != mode.vdisplay)) &&
+ XF86VidModeSwitchToMode(currDisplay, currScreen, modes[i]))
+ {
+ result_width = modes[i]->hdisplay;
+ result_height = modes[i]->vdisplay;
+ }
+
+ /* Lock mode switching. */
+ XF86VidModeLockModeSwitch(currDisplay, currScreen, True);
+
+ /* Set viewport. */
+ XF86VidModeSetViewPort(currDisplay, currScreen, 0, 0);
+
+ /* clean up */
+ if (mode.privsize)
+ XFree(mode.c_private);
+
+ if (mode_count)
+ {
+ for (i = 0; i < mode_count; i++)
+ if (modes[i]->privsize)
+ XFree(modes[i]->c_private);
+ XFree(modes);
+ }
+}
+
+
+static void pwXf86VmRestoreOriginalResolution ( )
+{
+ int i;
+ XF86VidModeModeLine mode;
+
+ if ( ! XF86VidModeData.vidmode_available )
+ return;
+
+ /* Unlock mode switching. */
+ XF86VidModeLockModeSwitch(currDisplay, currScreen, False);
+
+ if (!XF86VidModeGetModeLine(currDisplay, currScreen, &i, &mode) ||
+ (mode.hdisplay != XF86VidModeData.orig_mode.hdisplay) ||
+ (mode.vdisplay != XF86VidModeData.orig_mode.vdisplay))
+ {
+ if (!XF86VidModeSwitchToMode(currDisplay, currScreen,
+ &XF86VidModeData.orig_mode))
+ fprintf(stderr, "XF86VidMode couldnot restore original resolution\n");
+ }
+ if (XF86VidModeData.orig_viewport_x || XF86VidModeData.orig_viewport_y)
+ {
+ if (!XF86VidModeSetViewPort(currDisplay, currScreen,
+ XF86VidModeData.orig_viewport_x,
+ XF86VidModeData.orig_viewport_y))
+ fprintf(stderr, "XF86VidMode couldnot restore original viewport\n");
+ }
+}
+#endif
+
+
+void
+pwSetSize ( int w, int h )
+{
+ bool notResizable = !resizable;
+
+ if (notResizable)
+ pwRealSetResizable ( true, w, h );
+
XResizeWindow ( currDisplay, currHandle, w, h ) ;
- XFlush ( currDisplay ) ;
+ XResizeWindow ( currDisplay, wmWindow, w, h ) ;
+
+ if (notResizable)
+ pwRealSetResizable ( false, w, h );
+
+#ifdef XF86VIDMODE
+ if (fsWindow != None)
+ {
+ int screen_w = 0, screen_h ;
+ pwXf86VmSetFullScreenResolution ( w, h, screen_w, screen_h ) ;
+ /* check pwXf86VmSetFullScreenResolution didn't fail completly. */
+ if (screen_w)
+ {
+ /* Center the window */
+ XMoveWindow ( currDisplay, currHandle, ( screen_w - w ) / 2,
+ ( screen_h - h ) / 2 ) ;
+ }
+ }
+#endif
+
+ XFlush ( currDisplay );
}
void pwSetOrigin ( int x, int y )
{
- XMoveWindow ( currDisplay, currHandle, x, y ) ;
+ XMoveWindow ( currDisplay, wmWindow, x, y ) ;
XFlush ( currDisplay ) ;
}
void pwSetSizeOrigin ( int x, int y, int w, int h )
{
- XMoveWindow ( currDisplay, currHandle, x, y ) ;
- XResizeWindow ( currDisplay, currHandle, w, h ) ;
- XFlush ( currDisplay ) ;
+ XMoveWindow ( currDisplay, wmWindow, x, y ) ;
+ pwSetSize ( w, h );
}
@@ -474,7 +735,11 @@
switch ( event.type )
{
case ClientMessage : (*exitCB)() ; break ;
- case DestroyNotify : (*exitCB)() ; break ;
+
+ case DestroyNotify :
+ if ( event.xdestroywindow.window == wmWindow )
+ (*exitCB)() ;
+ break ;
case ConfigureNotify :
if ( currHandle == event.xconfigure.window &&
@@ -605,7 +870,7 @@
void pwSwapBuffers ()
{
- if ( ! initialised )
+ if ( ! currDisplay )
{
fprintf ( stderr, "PLIB/PW: FATAL - Application called pwSwapBuffers"
" before pwInit.\n" ) ;
@@ -635,15 +900,133 @@
#endif
+void pwSetFullscreen ()
+{
+ XEvent event;
+ XSetWindowAttributes setattr;
+ /* local width and height vars used for fullscreen window size and for
+ storing the video_mode size which is then used to center the window */
+ int fs_width = DisplayWidth(currDisplay, currScreen);
+ int fs_height = DisplayHeight(currDisplay, currScreen);
+
+ /* Grab the keyboard */
+ if (XGrabKeyboard(currDisplay, rootWindow, False, GrabModeAsync,
+ GrabModeAsync, CurrentTime) != GrabSuccess)
+ {
+ fprintf(stderr, "Error can not grab keyboard, not going fullscreen\n");
+ return;
+ }
+ keyb_grabbed = true;
+
+ /* Create the fullscreen window */
+ setattr.override_redirect = True;
+ setattr.background_pixel = XBlackPixel(currDisplay, currScreen);
+ setattr.border_pixel = XBlackPixel(currDisplay, currScreen);
+ setattr.event_mask = StructureNotifyMask;
+ setattr.colormap = XCreateColormap ( currDisplay, rootWindow,
+ visualInfo->visual, AllocNone ) ;
+ fsWindow = XCreateWindow(currDisplay, rootWindow,
+ 0, 0, fs_width, fs_height, 0,
+ visualInfo->depth, InputOutput,
+ visualInfo->visual, CWOverrideRedirect |
+ CWBackPixel | CWColormap | CWBorderPixel |
+ CWEventMask, &setattr);
+
+ /* Map the fullscreen window */
+ XMapRaised(currDisplay, fsWindow);
+ /* wait until we are mapped. (shamelessly borrowed from SDL) */
+ do {
+ XMaskEvent(currDisplay, StructureNotifyMask, &event);
+ } while ( (event.type != MapNotify) ||
+ (event.xmap.event != fsWindow) );
+ /* Make sure we got to the top of the window stack */
+ XRaiseWindow(currDisplay, fsWindow);
+
+ /* Reparent the real window */
+ XReparentWindow(currDisplay, currHandle, fsWindow, 0, 0);
+
+ /* Grab the mouse. */
+ if (XGrabPointer(currDisplay, currHandle, False,
+ PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
+ GrabModeAsync, GrabModeAsync, currHandle, None,
+ CurrentTime) == GrabSuccess)
+ mouse_grabbed = true;
+ else
+ fprintf(stderr, "Warning can not grab mouse\n");
+
+ /* Make sure we get any last resize events before using size[] */
+ getEvents();
+
+#ifdef XF86VIDMODE
+ /* Switch resolution */
+ pwXf86VmSetFullScreenResolution (size[0], size[1], fs_width, fs_height);
+#endif
+
+ /* Center the window (if nescesarry) */
+ if ((fs_width != size[0]) || (fs_height != size[1]))
+ XMoveWindow(currDisplay, currHandle, (fs_width - size[0]) / 2,
+ (fs_height - size[1]) / 2);
+
+ /* And last set the cursor */
+ pwRealSetCursor (fsCursor);
+}
+
+
+void pwSetWindowed ()
+{
+ if (mouse_grabbed) {
+ XUngrabPointer(currDisplay, CurrentTime);
+ mouse_grabbed = false;
+ }
+ if (keyb_grabbed) {
+ XUngrabKeyboard(currDisplay, CurrentTime);
+ keyb_grabbed = false;
+ }
+
+#ifdef XF86VIDMODE
+ /* Switch resolution */
+ pwXf86VmRestoreOriginalResolution ( ) ;
+#endif
+
+ /* Reparent the real window! */
+ XReparentWindow(currDisplay, currHandle, wmWindow, 0, 0);
+ XUnmapWindow(currDisplay, fsWindow);
+ XDestroyWindow(currDisplay, fsWindow);
+ fsWindow = None;
+
+ /* And last set the cursor */
+ pwRealSetCursor (wmCursor);
+}
+
+
+void pwToggleFullscreen ()
+{
+ if (fsWindow == None)
+ pwSetFullscreen () ;
+ else
+ pwSetWindowed () ;
+}
+
+
void pwCleanup ()
{
- if ( ! initialised )
- fprintf ( stderr, "PLIB/PW: WARNING - Application called pwCleanup"
- " before pwInit.\n" ) ;
+ if ( ! currDisplay )
+ return;
+
+ if ( titlePropertyPtr )
+ {
+ XFree ( titlePropertyPtr->value ) ;
+ titlePropertyPtr = NULL;
+ }
+
+ if ( fsWindow != None )
+ pwSetWindowed ( ) ;
glXDestroyContext ( currDisplay, currContext ) ;
XDestroyWindow ( currDisplay, currHandle ) ;
- XFlush ( currDisplay ) ;
+ XDestroyWindow ( currDisplay, wmWindow ) ;
+ XCloseDisplay ( currDisplay ) ;
+ currDisplay = NULL;
}
plib-shared-lib.patch:
configure.in | 4 +++-
src/Makefile.am | 2 +-
src/fnt/Makefile.am | 6 ++++--
src/js/Makefile.am | 6 ++++--
src/net/Makefile.am | 6 ++++--
src/psl/Makefile.am | 16 +++++++++-------
src/puAux/Makefile.am | 37 +++++++++++++++++++++----------------
src/pui/Makefile.am | 8 ++++++--
src/pw/Makefile.am | 6 ++++--
src/sg/Makefile.am | 10 ++++++----
src/sl/Makefile.am | 10 +++++++---
src/ssg/Makefile.am | 8 ++++++--
src/ssgAux/Makefile.am | 41 +++++++++++++++++++++++------------------
src/util/Makefile.am | 6 ++++--
14 files changed, 102 insertions(+), 64 deletions(-)
--- NEW FILE plib-shared-lib.patch ---
--- configure.in
+++ configure.in
@@ -37,6 +37,8 @@
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_RANLIB
+AC_LIBTOOL_WIN32_DLL
+AM_PROG_LIBTOOL
dnl Command line arguments
@@ -250,7 +252,7 @@
dnl CygWin under Windoze.
dnl Multimedia library
- LIBS="$LIBS -lwinmm"
+ LIBS="$LIBS -lgdi32 -lwinmm -lws2_32"
if test "x$need_opengl" = "xyes"; then
dnl OpenGL libraries
Index: src/puAux/Makefile.am
===================================================================
--- src/puAux/Makefile.am (revisione 2131)
+++ src/puAux/Makefile.am (copia locale)
@@ -1,30 +1,35 @@
if BUILD_PUAUX
-lib_LIBRARIES = libplibpuaux.a
+lib_LTLIBRARIES = libplibpuaux.la
include_HEADERS = puAux.h puAuxLocal.h
-libplibpuaux_a_SOURCES = puAux.cxx \
- puAuxBiSlider.cxx \
- puAuxBiSliderWithEnds.cxx \
- puAuxComboBox.cxx \
- puAuxCompass.cxx \
- puAuxFileSelector.cxx \
- puAuxLargeInput.cxx \
- puAuxList.cxx \
- puAuxScrollBar.cxx \
- puAuxSelectBox.cxx \
- puAuxSliderWithInput.cxx \
- puAuxSpinBox.cxx \
- puAuxTriSlider.cxx \
- puAuxVerticalMenu.cxx \
- puAuxChooser.cxx
+libplibpuaux_la_SOURCES = puAux.cxx \
+ puAuxBiSlider.cxx \
+ puAuxBiSliderWithEnds.cxx \
+ puAuxComboBox.cxx \
+ puAuxCompass.cxx \
+ puAuxFileSelector.cxx \
+ puAuxLargeInput.cxx \
+ puAuxList.cxx \
+ puAuxScrollBar.cxx \
+ puAuxSelectBox.cxx \
+ puAuxSliderWithInput.cxx \
+ puAuxSpinBox.cxx \
+ puAuxTriSlider.cxx \
+ puAuxVerticalMenu.cxx \
+ puAuxChooser.cxx
INCLUDES = -I$(top_srcdir)/src/sg \
-I$(top_srcdir)/src/pui \
-I$(top_srcdir)/src/fnt \
-I$(top_srcdir)/src/util
+libplibpuaux_la_LDFLAGS = -no-undefined \
+ -L at top_builddir@/src/util -lplibul \
+ -L at top_builddir@/src/pui -lplibpu \
+ -L at top_builddir@/src/sg -lplibsg
+
endif
EXTRA_DIST = puAux.dsp
Index: src/net/Makefile.am
===================================================================
--- src/net/Makefile.am (revisione 2131)
+++ src/net/Makefile.am (copia locale)
@@ -1,15 +1,17 @@
if BUILD_NET
-lib_LIBRARIES = libplibnet.a
+lib_LTLIBRARIES = libplibnet.la
include_HEADERS = netBuffer.h netChannel.h netChat.h netMessage.h \
netMonitor.h netSocket.h net.h
-libplibnet_a_SOURCES = netBuffer.cxx netChannel.cxx netChat.cxx \
+libplibnet_la_SOURCES = netBuffer.cxx netChannel.cxx netChat.cxx \
netMessage.cxx netMonitor.cxx netSocket.cxx
INCLUDES = -I$(top_srcdir)/src/util
+libplibnet_la_LDFLAGS = -no-undefined -L at top_builddir@/src/util -lplibul
+
endif
EXTRA_DIST = net.dsp
Index: src/pw/Makefile.am
===================================================================
--- src/pw/Makefile.am (revisione 2131)
+++ src/pw/Makefile.am (copia locale)
@@ -1,13 +1,15 @@
if BUILD_PW
-lib_LIBRARIES = libplibpw.a
+lib_LTLIBRARIES = libplibpw.la
include_HEADERS = pw.h
-libplibpw_a_SOURCES = pw.cxx pwX11.cxx pwWindows.cxx pwMacOSX.cxx
+libplibpw_la_SOURCES = pw.cxx pwX11.cxx pwWindows.cxx pwMacOSX.cxx
INCLUDES = -I$(top_srcdir)/src/util
+libplibpw_la_LDFLAGS = -no-undefined -L at top_builddir@/src/util -lplibul
+
endif
EXTRA_DIST = pw.dsp
Index: src/fnt/Makefile.am
===================================================================
--- src/fnt/Makefile.am (revisione 2131)
+++ src/fnt/Makefile.am (copia locale)
@@ -1,13 +1,15 @@
if BUILD_FNT
-lib_LIBRARIES = libplibfnt.a
+lib_LTLIBRARIES = libplibfnt.la
include_HEADERS = fnt.h
-libplibfnt_a_SOURCES = fnt.cxx fntTXF.cxx fntLocal.h fntBitmap.cxx
+libplibfnt_la_SOURCES = fnt.cxx fntTXF.cxx fntLocal.h fntBitmap.cxx
INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/util
+libplibfnt_la_LDFLAGS = -no-undefined -L at top_builddir@/src/util -lplibul
+
endif
EXTRA_DIST = fnt.dsp
Index: src/sg/Makefile.am
===================================================================
--- src/sg/Makefile.am (revisione 2131)
+++ src/sg/Makefile.am (copia locale)
@@ -1,15 +1,17 @@
if BUILD_SG
-lib_LIBRARIES = libplibsg.a
+lib_LTLIBRARIES = libplibsg.la
include_HEADERS = sg.h
-libplibsg_a_SOURCES = sg.cxx sgd.cxx \
- sgIsect.cxx sgdIsect.cxx \
- sgPerlinNoise.cxx
+libplibsg_la_SOURCES = sg.cxx sgd.cxx \
+ sgIsect.cxx sgdIsect.cxx \
+ sgPerlinNoise.cxx
INCLUDES = -I$(top_srcdir)/src/util
+libplibsg_la_LDFLAGS = -no-undefined -L at top_builddir@/src/util -lplibul
+
endif
EXTRA_DIST = sg.dsp
Index: src/Makefile.am
===================================================================
--- src/Makefile.am (revisione 2131)
+++ src/Makefile.am (copia locale)
@@ -1 +1 @@
-SUBDIRS = util js sl pui puAux sg ssg fnt ssgAux net psl pw
+SUBDIRS = util fnt js sl pui sg puAux ssg ssgAux net psl pw
Index: src/ssgAux/Makefile.am
===================================================================
--- src/ssgAux/Makefile.am (revisione 2131)
+++ src/ssgAux/Makefile.am (copia locale)
@@ -1,6 +1,6 @@
if BUILD_SSGAUX
-lib_LIBRARIES = libplibssgaux.a
+lib_LTLIBRARIES = libplibssgaux.la
include_HEADERS = ssgAux.h \
ssgaShapes.h \
@@ -13,27 +13,32 @@
ssgaFire.h \
ssgaBillboards.h
-libplibssgaux_a_SOURCES = ssgAux.cxx \
- ssgaShapes.cxx \
- ssgaPatch.cxx \
- ssgaParticleSystem.cxx \
- ssgaWaveSystem.cxx \
- ssgaLensFlare.cxx \
- ssgaLensFlareTexture.cxx \
- ssgaFire.cxx \
- ssgaScreenDump.cxx \
- ssgaSphere.cxx \
- ssgaCelestialBody.cxx \
- ssgaCloudLayer.cxx \
- ssgaStars.cxx \
- ssgaSkyDome.cxx \
- ssgaSky.cxx \
- ssgaTeapot.cxx \
- ssgaBillboards.cxx
+libplibssgaux_la_SOURCES = ssgAux.cxx \
+ ssgaShapes.cxx \
+ ssgaPatch.cxx \
+ ssgaParticleSystem.cxx \
+ ssgaWaveSystem.cxx \
+ ssgaLensFlare.cxx \
+ ssgaLensFlareTexture.cxx \
+ ssgaFire.cxx \
+ ssgaScreenDump.cxx \
+ ssgaSphere.cxx \
+ ssgaCelestialBody.cxx \
+ ssgaCloudLayer.cxx \
+ ssgaStars.cxx \
+ ssgaSkyDome.cxx \
+ ssgaSky.cxx \
+ ssgaTeapot.cxx \
+ ssgaBillboards.cxx
INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/ssg
INCLUDES += -I$(top_srcdir)/src/util
+libplibssgaux_la_LDFLAGS = -no-undefined \
+ -L at top_builddir@/src/util -lplibul \
+ -L at top_builddir@/src/sg -lplibsg \
+ -L at top_builddir@/src/ssg -lplibssg
+
endif
EXTRA_DIST = ssgAux.dsp
Index: src/js/Makefile.am
===================================================================
--- src/js/Makefile.am (revisione 2131)
+++ src/js/Makefile.am (copia locale)
@@ -1,15 +1,17 @@
if BUILD_JS
-lib_LIBRARIES = libplibjs.a
+lib_LTLIBRARIES = libplibjs.la
include_HEADERS = js.h
-libplibjs_a_SOURCES = js.cxx jsLinux.cxx jsLinuxOld.cxx jsMacOS.cxx \
+libplibjs_la_SOURCES = js.cxx jsLinux.cxx jsLinuxOld.cxx jsMacOS.cxx \
jsMacOSX.cxx jsWindows.cxx jsBSD.cxx \
jsNone.cxx
INCLUDES = -I$(top_srcdir)/src/util
+libplibjs_la_LDFLAGS = -no-undefined -L at top_builddir@/src/util -lplibul
+
endif
EXTRA_DIST = js.dsp
Index: src/ssg/Makefile.am
===================================================================
--- src/ssg/Makefile.am (revisione 2131)
+++ src/ssg/Makefile.am (copia locale)
@@ -1,10 +1,10 @@
if BUILD_SSG
-lib_LIBRARIES = libplibssg.a
+lib_LTLIBRARIES = libplibssg.la
include_HEADERS = ssg.h ssgconf.h ssgMSFSPalette.h ssgKeyFlier.h pcx.h
-libplibssg_a_SOURCES = ssg.cxx ssgAnimation.cxx ssgBase.cxx \
+libplibssg_la_SOURCES = ssg.cxx ssgAnimation.cxx ssgBase.cxx \
ssgBaseTransform.cxx ssgBranch.cxx ssgContext.cxx ssgCutout.cxx \
ssgDList.cxx ssgEntity.cxx ssgIsect.cxx ssgLeaf.cxx ssgList.cxx \
ssgLoadDOF.cxx ssgLoadAC.cxx \
@@ -31,6 +31,10 @@
INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/util
+libplibssg_la_LDFLAGS = -no-undefined \
+ -L at top_builddir@/src/util -lplibul \
+ -L at top_builddir@/src/sg -lplibsg
+
endif
EXTRA_DIST = ssg.dsp
Index: src/pui/Makefile.am
===================================================================
--- src/pui/Makefile.am (revisione 2131)
+++ src/pui/Makefile.am (copia locale)
@@ -1,10 +1,10 @@
if BUILD_PUI
-lib_LIBRARIES = libplibpu.a
+lib_LTLIBRARIES = libplibpu.la
include_HEADERS = pu.h puGLUT.h puFLTK.h puSDL.h puNative.h puPW.h
-libplibpu_a_SOURCES = \
+libplibpu_la_SOURCES = \
pu.cxx puBox.cxx puButton.cxx puButtonBox.cxx \
puArrowButton.cxx puDialogBox.cxx puFrame.cxx puGroup.cxx \
puInput.cxx puInterface.cxx puLocal.h puMenuBar.cxx \
@@ -18,6 +18,10 @@
AM_CPPFLAGS = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/fnt
AM_CPPFLAGS += -I$(top_srcdir)/src/util
+libplibpu_la_LDFLAGS = -no-undefined \
+ -L at top_builddir@/src/util -lplibul \
+ -L at top_builddir@/src/fnt -lplibfnt
+
endif
EXTRA_DIST = pui.dsp
Index: src/util/Makefile.am
===================================================================
--- src/util/Makefile.am (revisione 2131)
+++ src/util/Makefile.am (copia locale)
@@ -1,12 +1,14 @@
if BUILD_UL
-lib_LIBRARIES = libplibul.a
+lib_LTLIBRARIES = libplibul.la
include_HEADERS = ul.h ulRTTI.h
-libplibul_a_SOURCES = ul.cxx ulClock.cxx ulError.cxx ulLinkedList.cxx \
+libplibul_la_SOURCES = ul.cxx ulClock.cxx ulError.cxx ulLinkedList.cxx \
ulList.cxx ulLocal.h ulRTTI.cxx
+libplibul_la_LDFLAGS = -no-undefined
+
endif
EXTRA_DIST = ul.dsp
Index: src/psl/Makefile.am
===================================================================
--- src/psl/Makefile.am (revisione 2131)
+++ src/psl/Makefile.am (copia locale)
@@ -1,19 +1,21 @@
if BUILD_PSL
-lib_LIBRARIES = libplibpsl.a
+lib_LTLIBRARIES = libplibpsl.la
include_HEADERS = psl.h
-libplibpsl_a_SOURCES = psl.cxx pslCodeGen.cxx pslContext.cxx \
- pslCompiler.cxx pslSymbols.cxx pslToken.cxx \
- pslExpression.cxx pslProgram.cxx pslDump.cxx \
- pslError.cxx pslFileIO.cxx pslCompiler.h \
- pslContext.h pslFileIO.h pslLocal.h \
- pslOpcodes.h pslSymbol.h
+libplibpsl_la_SOURCES = psl.cxx pslCodeGen.cxx pslContext.cxx \
+ pslCompiler.cxx pslSymbols.cxx pslToken.cxx \
+ pslExpression.cxx pslProgram.cxx pslDump.cxx \
+ pslError.cxx pslFileIO.cxx pslCompiler.h \
+ pslContext.h pslFileIO.h pslLocal.h \
+ pslOpcodes.h pslSymbol.h
INCLUDES = -I$(top_srcdir)/src/util
+libplibpsl_la_LDFLAGS = -no-undefined -L at top_builddir@/src/util -lplibul
+
endif
EXTRA_DIST = psl.dsp
Index: src/sl/Makefile.am
===================================================================
--- src/sl/Makefile.am (revisione 2131)
+++ src/sl/Makefile.am (copia locale)
@@ -1,19 +1,23 @@
if BUILD_SL
-lib_LIBRARIES = libplibsl.a libplibsm.a
+lib_LTLIBRARIES = libplibsl.la libplibsm.la
include_HEADERS = sl.h slPortability.h sm.h
-libplibsl_a_SOURCES = \
+libplibsl_la_SOURCES = \
slDSP.cxx slSample.cxx slEnvelope.cxx \
slPlayer.cxx slMODPlayer.cxx slSamplePlayer.cxx \
slScheduler.cxx slMODdacio.cxx slMODfile.cxx \
slMODinst.cxx slMODnote.cxx slMODPrivate.h slMODfile.h
-libplibsm_a_SOURCES = slPortability.h smMixer.cxx
+libplibsm_la_SOURCES = slPortability.h smMixer.cxx
INCLUDES = -I$(top_srcdir)/src/util
+libplibsl_la_LDFLAGS = -no-undefined -L at top_builddir@/src/util -lplibul
+
+libplibsm_la_LDFLAGS = -no-undefined -L at top_builddir@/src/util -lplibul
+
endif
EXTRA_DIST = sl.dsp
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/mingw32-plib/F-12/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore 27 Nov 2009 05:53:30 -0000 1.1
+++ .cvsignore 27 Nov 2009 14:42:53 -0000 1.2
@@ -0,0 +1 @@
+plib-1.8.5.tar.gz
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/mingw32-plib/F-12/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources 27 Nov 2009 05:53:30 -0000 1.1
+++ sources 27 Nov 2009 14:42:53 -0000 1.2
@@ -0,0 +1 @@
+47a6fbf63668c1eed631024038b2ea90 plib-1.8.5.tar.gz
More information about the fedora-extras-commits
mailing list