Hello everyone,

Yesterday the online game Second Life got released under the GNU GPL. I
took some time to port it to FreeBSD, but I cannot test/maintain it,
because I don't have OpenGL acceleration on my FreeBSD box and my
machine is quite cripple anyway (RELENG_6 -> CURRENT library horror).

Here's a patch if someone wants to maintain a port for it. Please notice
that Second Life depends on some ports that aren't in our ports tree:
openjpeg and xmlrpc-epi.

Yours,
-- 
 Ed Schouten <[EMAIL PROTECTED]>
 WWW: http://g-rave.nl/
--- linden/indra/SConstruct     Sun Jan  7 23:50:12 2007
+++ linden/indra/SConstruct     Tue Jan  9 09:10:47 2007
@@ -24,6 +24,8 @@
 if platform == 'linux2':
        platform = 'linux'
 
+platform = 'linux'
+
 ######################
 # GET VERSION        #
 ######################
@@ -104,7 +106,7 @@
        try:
                build_dir_prefix = os.environ['TEMP_BUILD_DIR']
        except:
-               build_dir_prefix = '/tmp/' + os.environ['USER']
+               build_dir_prefix = 'build'
                
        build_dir = build_dir_prefix + os.getcwd() + '/' + system_str + '-' + 
build_target + '-' + buildtype
 
@@ -181,15 +183,16 @@
                flags += '-DLL_LINUX=1 '
                system_link_flags += 
'-Wl,--version-script=newview/linux_tools/hidesymbols.ver '
                if build_target == 'client':
-                       flags += '-DAPPID=secondlife -DLL_SDL=1 -DLL_X11=1 '
+                       flags += '-DAPPID=secondlife -DLL_SDL=1 -DLL_FMOD=0 
-DLL_X11=1 '
                        flags += '-DLL_GTK=1 '
-                       client_external_libs += [ 'gtk-x11-2.0', 'elfio' ]
-                       include_dirs += [ ' ../libraries/' + system_str + 
'/include/gtk-2.0' ]
-                       include_dirs += [ ' ../libraries/' + system_str + 
'/include/glib-2.0']
-                       include_dirs += [ ' ../libraries/' + system_str + 
'/include/pango-1.0' ]
-                       include_dirs += [ ' ../libraries/' + system_str + 
'/include/atk-1.0' ]
-                       include_dirs += [ ' ../libraries/' + system_str + 
'/include/ELFIO' ]
-                       include_dirs += [ ' ../libraries/' + system_str + 
'/include/llfreetype2' ]
+                       client_external_libs += [ 'ELFIO' ]
+
+                       pipe = os.popen('pkg-config --cflags gtk+-2.0; 
curl-config --cflags')
+                       flags += pipe.read().replace('\n','')
+                       pipe.close()
+                       pipe = os.popen('pkg-config --libs gtk+-2.0; 
curl-config --libs')
+                       system_link_flags += pipe.read().replace('\n','') + ' '
+                       pipe.close()
        else:
                # Mac-only flags
                flags += '-x c++ -arch ppc -pipe -Wno-trigraphs 
-fpascal-strings -faltivec -fasm-blocks -g -O2 -fmessage-length=0 -mtune=G4 
-Wno-deprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.3 
-DLL_DARWIN=1 -Wmost -Wno-sign-compare -Wno-switch -fpch-preprocess 
-F./newview/build/Deployment -fconstant-cfstrings -ffor-scope -Wno-reorder 
-isysroot /Developer/SDKs/MacOSX10.3.9.sdk '
@@ -205,7 +208,7 @@
        # ENVIRONMENT  #
        ################
 
-       gcc_bin = 'g++-3.4'
+       gcc_bin = 'g++'
        # If you strip more aggressively than -S then the quality of crash-
        # logger backtraces deteriorates.
        strip_cmd = 'strip -S -o $TARGET $SOURCE'
@@ -355,7 +358,7 @@
        create_static_module('llxml')
        create_static_module('lscript')
 
-       net_external_libs = [ 'curl', 'ssl', 'crypto', 'aprutil-1', 'apr-1' ]
+       net_external_libs = [ 'ssl', 'crypto', 'aprutil-1', 'apr-1' ]
        common_external_libs = net_external_libs + [ 'xmlrpc', 'expat', 'z' ]
 
        if build_target == 'client':
@@ -381,7 +384,7 @@
                ##################
                output_bin = 'newview/secondlife-' + arch + '-bin'
 
-               external_libs = client_external_libs + common_external_libs + [ 
'freetype', 'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 
'vorbis', 'fmod-3.75', 'db-4.2', 'openjpeg' ]
+               external_libs = client_external_libs + common_external_libs + [ 
'jpeg', 'SDL', 'GL', 'GLU', 'ogg', 'vorbisenc', 'vorbisfile', 'vorbis', 
'db-4.2', 'openjpeg' ]
 
                internal_libs = [ 'lscript', 'llwindow', 'llrender', 
'llprimitive',
                                 'llmedia', 'llinventory', 
--- linden/indra/linux_crash_logger/linux_crash_logger.cpp      Sun Jan  7 
23:50:17 2007
+++ linden/indra/linux_crash_logger/linux_crash_logger.cpp      Mon Jan  8 
20:41:19 2007
@@ -458,7 +458,7 @@
                if(!gCrashInPreviousExec && isCrashLog)
                {
                        // Make sure the file isn't too old.
-                       double age = difftime(gLaunchTime, 
stat_data.st_mtim.tv_sec);
+                       double age = difftime(gLaunchTime, 
stat_data.st_mtimespec.tv_sec);
 
 //                     llinfos << "age is " << age << llendl;
 
--- linden/indra/llcommon/llpagemem.h   Sun Jan  7 23:50:13 2007
+++ linden/indra/llcommon/llpagemem.h   Mon Jan  8 21:00:03 2007
@@ -26,9 +26,7 @@
 #ifndef LL_LLPAGEMEM_H
 #define LL_LLPAGEMEM_H
 
-#if !LL_DARWIN
-#include "malloc.h"
-#endif
+#include <stdlib.h>
 
 #include "llrand.h"
 
--- linden/indra/llcommon/llpreprocessor.h      Sun Jan  7 23:50:13 2007
+++ linden/indra/llcommon/llpreprocessor.h      Mon Jan  8 19:09:11 2007
@@ -32,10 +32,10 @@
 // Figure out endianness of platform
 #ifdef LL_LINUX
 #define __ENABLE_WSTRING
-#include <endian.h>
+#include <machine/endian.h>
 #endif //      LL_LINUX
 
-#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (__BYTE_ORDER == 
__LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)))
+#if (defined(LL_WINDOWS) || (defined(LL_LINUX) && (_BYTE_ORDER == 
_LITTLE_ENDIAN)) || (defined(LL_DARWIN) && defined(__LITTLE_ENDIAN__)))
 #define LL_LITTLE_ENDIAN 1
 #else
 #define LL_BIG_ENDIAN 1
--- linden/indra/llcommon/llsdserialize_xml.cpp Sun Jan  7 23:50:13 2007
+++ linden/indra/llcommon/llsdserialize_xml.cpp Mon Jan  8 19:13:41 2007
@@ -35,7 +35,7 @@
 
 extern "C"
 {
-#include "expat/expat.h"
+#include "expat.h"
 }
 
 /**
--- linden/indra/llcommon/llsys.cpp     Sun Jan  7 23:50:13 2007
+++ linden/indra/llcommon/llsys.cpp     Mon Jan  8 19:17:21 2007
@@ -30,14 +30,14 @@
 #include "llsys.h"
 
 #include <iostream>
-#include <zlib/zlib.h>
+#include <zlib.h>
 #include "processor.h"
 
 #if LL_WINDOWS
 #      define WIN32_LEAN_AND_MEAN
 #      include <winsock2.h>
 #      include <windows.h>
-#elif LL_DARWIN
+#elif LL_DARWIN || defined(__FreeBSD__)
 #      include <sys/sysctl.h>
 #      include <sys/utsname.h>
 #elif LL_LINUX
@@ -356,7 +356,7 @@
 
 void LLCPUInfo::stream(std::ostream& s) const
 {
-#if LL_WINDOWS || LL_DARWIN
+#if LL_WINDOWS || LL_DARWIN || defined(__FreeBSD__)
        // gather machine information.
        char proc_buf[CPUINFO_BUFFER_SIZE];             /* Flawfinder: ignore */
        CProcessor proc;
@@ -395,7 +395,6 @@
 
 #if LL_LINUX
 #include <unistd.h>
-#include <sys/sysinfo.h>
 #endif
 
 U32 LLMemoryInfo::getPhysicalMemory() const
@@ -407,7 +406,7 @@
 
        return (U32)state.dwTotalPhys;
 
-#elif LL_DARWIN
+#elif LL_DARWIN || defined(__FreeBSD__)
        // This might work on Linux as well.  Someone check...
        unsigned int phys = 0;
        int mib[2] = { CTL_HW, HW_PHYSMEM };
@@ -440,7 +439,7 @@
        s << "Avail page Kb:      " << (U32)state.dwAvailPageFile/1024 << 
std::endl;
        s << "Total Virtual Kb:   " << (U32)state.dwTotalVirtual/1024 << 
std::endl;
        s << "Avail Virtual Kb:   " << (U32)state.dwAvailVirtual/1024 << 
std::endl;
-#elif LL_DARWIN
+#elif LL_DARWIN || defined(__FreeBSD__)
        U64 phys = 0;
 
        size_t len = sizeof(phys);      
--- linden/indra/llimage/llimagejpeg.h  Sun Jan  7 23:50:13 2007
+++ linden/indra/llimage/llimagejpeg.h  Mon Jan  8 19:28:54 2007
@@ -33,9 +33,9 @@
 #include "llimage.h"
 
 extern "C" {
-#include "jpeglib/jinclude.h"
-#include "jpeglib/jpeglib.h"
-#include "jpeglib/jerror.h"
+#include "jinclude.h"
+#include "jpeglib.h"
+#include "jerror.h"
 }
 
 class LLImageJPEG : public LLImageFormatted
--- linden/indra/llimagej2coj/llimagej2coj.cpp  Sun Jan  7 23:50:13 2007
+++ linden/indra/llimagej2coj/llimagej2coj.cpp  Mon Jan  8 20:59:14 2007
@@ -28,7 +28,7 @@
 #include "linden_common.h"
 #include "llimagej2coj.h"
 
-#include "openjpeg/openjpeg.h"
+#include <openjpeg.h>
 
 #include "lltimer.h"
 #include "llmemory.h"
--- linden/indra/llmath/lluuid.cpp      Sun Jan  7 23:50:14 2007
+++ linden/indra/llmath/lluuid.cpp      Mon Jan  8 19:18:30 2007
@@ -565,7 +565,7 @@
 #define HAVE_NETINET_IN_H
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
-#if !LL_DARWIN
+#if !LL_DARWIN && !defined(__FreeBSD__)
 #include <linux/sockios.h>
 #endif
 #endif
--- linden/indra/llmessage/llfiltersd2xmlrpc.cpp        Sun Jan  7 23:50:15 2007
+++ linden/indra/llmessage/llfiltersd2xmlrpc.cpp        Mon Jan  8 19:25:40 2007
@@ -76,7 +76,7 @@
 
 #include <sstream>
 #include <iterator>
-#include <xmlrpc-epi/xmlrpc.h>
+#include <xmlrpc.h>
 #include "apr-1/apr_base64.h"
 
 #include "llbuffer.h"
--- linden/indra/llmessage/llhttpassetstorage.cpp       Sun Jan  7 23:50:15 2007
+++ linden/indra/llmessage/llhttpassetstorage.cpp       Mon Jan  8 19:15:12 2007
@@ -34,7 +34,7 @@
 #include "llvfile.h"
 #include "llvfs.h"
 
-#include "zlib/zlib.h"
+#include <zlib.h>
 
 const F32 MAX_PROCESSING_TIME = 0.005f;
 const S32 CURL_XFER_BUFFER_SIZE = 65536;
--- linden/indra/llmessage/message.h    Sun Jan  7 23:50:14 2007
+++ linden/indra/llmessage/message.h    Mon Jan  8 19:19:32 2007
@@ -34,7 +34,7 @@
 #include <set>
 
 #if LL_LINUX
-#include <endian.h>
+//#include <endian.h>
 #include <netinet/in.h>
 #endif
 
--- linden/indra/llrender/llfont.cpp    Sun Jan  7 23:50:15 2007
+++ linden/indra/llrender/llfont.cpp    Mon Jan  8 20:19:31 2007
@@ -30,11 +30,7 @@
 #include "llfont.h"
 
 // Freetype stuff
-#if LL_LINUX   // I had to do some work to avoid the system-installed FreeType 
headers... --ryan.
-#include "llfreetype2/freetype/ft2build.h"
-#else
 #include <ft2build.h>
-#endif
 
 // For some reason, this won't work if it's not wrapped in the ifdef
 #ifdef FT_FREETYPE_H
--- linden/indra/llxml/llxmlnode.h      Sun Jan  7 23:50:17 2007
+++ linden/indra/llxml/llxmlnode.h      Mon Jan  8 19:13:54 2007
@@ -29,7 +29,7 @@
 #define LL_LLXMLNODE_H
 
 #define XML_STATIC
-#include "expat/expat.h"
+#include "expat.h"
 #include <map>
 
 #include "indra_constants.h"
--- linden/indra/llxml/llxmlparser.h    Sun Jan  7 23:50:17 2007
+++ linden/indra/llxml/llxmlparser.h    Mon Jan  8 19:13:56 2007
@@ -29,7 +29,7 @@
 #define LL_LLXMLPARSER_H
 
 #define XML_STATIC
-#include "expat/expat.h"
+#include "expat.h"
 
 class LLXmlParser
 {
--- linden/indra/newview/lluserauth.cpp Sun Jan  7 23:50:24 2007
+++ linden/indra/newview/lluserauth.cpp Mon Jan  8 19:25:51 2007
@@ -40,7 +40,7 @@
 
 // NOTE: MUST include these after otherincludes since queue gets redefined!?!!
 #include <curl/curl.h>
-#include <xmlrpc-epi/xmlrpc.h>
+#include <xmlrpc.h>
 
 
 
--- linden/indra/newview/llviewerobjectlist.cpp Sun Jan  7 23:50:25 2007
+++ linden/indra/newview/llviewerobjectlist.cpp Mon Jan  8 19:15:03 2007
@@ -60,7 +60,7 @@
 #include "u64.h"
 #include "llviewerimagelist.h"
 #include "lldatapacker.h"
-#include <zlib/zlib.h>
+#include <zlib.h>
 #include "object_flags.h"
 
 extern BOOL gVelocityInterpolate;
--- linden/indra/newview/llxmlrpctransaction.cpp        Sun Jan  7 23:50:24 2007
+++ linden/indra/newview/llxmlrpctransaction.cpp        Mon Jan  8 19:26:01 2007
@@ -33,7 +33,7 @@
 
 // Have to include these last to avoid queue redefinition!
 #include <curl/curl.h>
-#include <xmlrpc-epi/xmlrpc.h>
+#include <xmlrpc.h>
 
 #include "viewer.h"
 
--- linden/indra/newview/viewer.cpp     Sun Jan  7 23:50:23 2007
+++ linden/indra/newview/viewer.cpp     Tue Jan  9 09:08:34 2007
@@ -69,7 +69,7 @@
   #    include <netinet/in.h>
   #    include <arpa/inet.h>   // inet_ntoa()
 
-  #if LL_LINUX
+  #if LL_LINUX && !defined(__FreeBSD__)
   #    include <dlfcn.h>               // RTLD_LAZY
   #     include <execinfo.h>            // backtrace - glibc only
   #define LL_ELFBIN 1
@@ -2197,7 +2197,7 @@
 #endif
 }
 
-#if LL_LINUX
+#if LL_LINUX && !defined(__FreeBSD__)
 #define MAX_STACK_TRACE_DEPTH 40
 // This uses glibc's basic built-in stack-trace functions for a not very
 // amazing backtrace.
@@ -2360,6 +2360,8 @@
 
 void viewer_crash_callback()
 {
+       gReportedCrash = TRUE;
+#ifndef __FreeBSD__
        // Returns whether a dialog was shown.
        // Only do the logic in here once
        if (gReportedCrash)
@@ -2499,6 +2501,7 @@
 #endif // LL_DARWIN
 
        return;
+#endif
 }
 
 

Attachment: pgpuV7zSi3IOL.pgp
Description: PGP signature

Reply via email to