[SCM] A client for connecting to 3D metaverses such as Linden Labs Secondlife(tm) and OpenSim grids branch, master, updated. upstream/1.20.15-68-g3c8b31e
Robin Cornelius
robin.cornelius at gmail.com
Tue Sep 2 19:43:06 UTC 2008
The following commit has been merged in the master branch:
commit 7a644b180ac196f9b432e0cc5eca3813a36154af
Author: Robin Cornelius <robin.cornelius at gmail.com>
Date: Tue Sep 2 20:39:57 2008 +0100
Remove ALL old patches
diff --git a/debian/patches/0000_keep_statbars_from_overshooting.patch.dpatch b/debian/patches/0000_keep_statbars_from_overshooting.patch.dpatch
deleted file mode 100644
index 13a17d5..0000000
--- a/debian/patches/0000_keep_statbars_from_overshooting.patch.dpatch
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Keep stat bars from overshooting.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/newview/llstatbar.cpp
-===================================================================
---- ./indra/newview/llstatbar.cpp (revision 49)
-+++ ./indra/newview/llstatbar.cpp (working copy)
-@@ -223,6 +223,7 @@
- }
-
- right = (S32) ((max - mMinBar) * value_scale);
-+ right = llclamp(0, right, width);
- gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 0.f, 0.f, 0.25f));
-
- S32 num_values = mStatp->getNumValues() - 1;
-@@ -238,22 +239,22 @@
- if (mPerSec)
- {
- left = (S32)((mStatp->getPrevPerSec(i) - mMinBar) * value_scale);
-- right = (S32)((mStatp->getPrevPerSec(i) - mMinBar) * value_scale) + 1;
-- gl_rect_2d(left, bottom+i+1, right, bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f));
- }
- else
- {
- left = (S32)((mStatp->getPrev(i) - mMinBar) * value_scale);
-- right = (S32)((mStatp->getPrev(i) - mMinBar) * value_scale) + 1;
-- gl_rect_2d(left, bottom+i+1, right, bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f));
-- }
-+ }
-+ left = llclamp(0, left, width-1);
-+ right = left+1;
-+ gl_rect_2d(left, bottom+i+1, right, bottom+i, LLColor4(1.f, 0.f, 0.f, 1.f));
- }
- }
- else
- {
- // draw current
- left = (S32) ((current - mMinBar) * value_scale) - 1;
-- right = (S32) ((current - mMinBar) * value_scale) + 1;
-+ left = llclamp(0, left, width-1);
-+ right = left + 2;
- gl_rect_2d(left, top, right, bottom, LLColor4(1.f, 0.f, 0.f, 1.f));
- }
-
diff --git a/debian/patches/0000_no_idle_memcheck.dpatch b/debian/patches/0000_no_idle_memcheck.dpatch
deleted file mode 100644
index af865b1..0000000
--- a/debian/patches/0000_no_idle_memcheck.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Don't call idle mem check.dpatch by <robin.cornelius at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: This fix missed the offical release but needs to go in now
-
- at DPATCH@
-
-diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
-index 6e8528c..dc79dd4 100644
---- a/indra/newview/llappviewer.cpp
-+++ b/indra/newview/llappviewer.cpp
-@@ -942,7 +942,7 @@ bool LLAppViewer::mainLoop()
- #endif
-
- //at the beginning of every frame, check if the system can successfully allocate 10 * 1 MB memory.
-- idle_mem_check(10) ;
-+ //idle_mem_check(10) ;
-
- if (!LLApp::isExiting())
- {
diff --git a/debian/patches/0000_valgrind_wild_vars.dpatch b/debian/patches/0000_valgrind_wild_vars.dpatch
deleted file mode 100644
index 738a613..0000000
--- a/debian/patches/0000_valgrind_wild_vars.dpatch
+++ /dev/null
@@ -1,164 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Fix valgrid errors.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: valgrinding
-
- at DPATCH@
-
-Index: ./indra/newview/lltexturefetch.cpp
-===================================================================
---- ./indra/newview/lltexturefetch.cpp (revision 376)
-+++ ./indra/newview/lltexturefetch.cpp (working copy)
-@@ -420,7 +420,8 @@
- mFirstPacket(0),
- mLastPacket(-1),
- mTotalPackets(0),
-- mImageCodec(IMG_CODEC_INVALID)
-+ mImageCodec(IMG_CODEC_INVALID),
-+ mAccelerateDownloadStuckTexture(FALSE)
- {
- calcWorkPriority();
- mType = host.isOk() ? LLImageBase::TYPE_AVATAR_BAKE : LLImageBase::TYPE_NORMAL;
-Index: ./indra/newview/llvoavatar.cpp
-===================================================================
---- ./indra/newview/llvoavatar.cpp (revision 376)
-+++ ./indra/newview/llvoavatar.cpp (working copy)
-@@ -680,7 +680,10 @@
- mTexEyeColor( NULL ),
- mNeedsSkin(FALSE),
- mUpdatePeriod(1),
-- mFullyLoadedInitialized(FALSE)
-+ mPreviousFullyLoaded(FALSE),
-+ mVisibleChat( FALSE ),
-+ mFullyLoadedInitialized(FALSE),
-+ mFullyLoaded(FALSE)
- {
- LLMemType mt(LLMemType::MTYPE_AVATAR);
-
-Index: ./indra/newview/llfloaterfriends.cpp
-===================================================================
---- ./indra/newview/llfloaterfriends.cpp (revision 376)
-+++ ./indra/newview/llfloaterfriends.cpp (working copy)
-@@ -70,6 +70,7 @@
- public:
- LLLocalFriendsObserver(LLPanelFriends* floater) : mFloater(floater), LLEventTimer(OBSERVER_TIMEOUT)
- {
-+ mMask = 0; // Valgrinding alerts this as used wild
- mEventTimer.stop();
- }
- virtual ~LLLocalFriendsObserver()
-Index: ./indra/newview/llviewerparcelmediaautoplay.cpp
-===================================================================
---- ./indra/newview/llviewerparcelmediaautoplay.cpp (revision 376)
-+++ ./indra/newview/llviewerparcelmediaautoplay.cpp (working copy)
-@@ -48,7 +48,8 @@
- LLViewerParcelMediaAutoPlay::LLViewerParcelMediaAutoPlay() :
- LLEventTimer(1),
- mPlayed(FALSE),
-- mTimeInParcel(0)
-+ mTimeInParcel(0),
-+ mLastParcelID(0)
- {
- }
-
-Index: ./indra/llcharacter/lljoint.cpp
-===================================================================
---- ./indra/llcharacter/lljoint.cpp (revision 376)
-+++ ./indra/llcharacter/lljoint.cpp (working copy)
-@@ -70,6 +70,7 @@
- mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f));
- mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY;
- mJointNum = 0;
-+ mUpdateXform = TRUE; // Valgrind catch, Check this is the correct init here for this state
-
- setName(name);
- if (parent)
-Index: ./indra/llcharacter/llkeyframemotion.cpp
-===================================================================
---- ./indra/llcharacter/llkeyframemotion.cpp (revision 376)
-+++ ./indra/llcharacter/llkeyframemotion.cpp (working copy)
-@@ -72,6 +72,11 @@
- //-----------------------------------------------------------------------------
- LLKeyframeMotion::JointMotionList::JointMotionList()
- {
-+ // mMaxPriority IS being used wild in some comparisions,
-+ // it needs defaulting, but this might not be the
-+ // best deafult MichelleZ
-+
-+ mMaxPriority=LLJoint::MEDIUM_PRIORITY;
- }
-
- LLKeyframeMotion::JointMotionList::~JointMotionList()
-Index: ./indra/llui/lltextbox.cpp
-===================================================================
---- ./indra/llui/lltextbox.cpp (revision 376)
-+++ ./indra/llui/lltextbox.cpp (working copy)
-@@ -102,6 +102,8 @@
- mBorderVisible(FALSE),
- mFontStyle(LLFontGL::DROP_SHADOW_SOFT),
- mBorderDropShadowVisible(FALSE),
-+ mUseEllipses( FALSE ),
-+ mHasHover( FALSE ),
- mHPad(0),
- mVPad(0),
- mHAlign(LLFontGL::LEFT),
-@@ -124,6 +126,8 @@
- mBorderVisible(FALSE),
- mFontStyle(LLFontGL::DROP_SHADOW_SOFT),
- mBorderDropShadowVisible(FALSE),
-+ mUseEllipses( FALSE ),
-+ mHasHover( FALSE ),
- mHPad(0),
- mVPad(0),
- mHAlign(LLFontGL::LEFT),
-Index: ./indra/llui/lltexteditor.cpp
-===================================================================
---- ./indra/llui/lltexteditor.cpp (revision 376)
-+++ ./indra/llui/lltexteditor.cpp (working copy)
-@@ -282,7 +282,9 @@
- mMouseDownX(0),
- mMouseDownY(0),
- mLastSelectionX(-1),
-- mLastSelectionY(-1)
-+ mLastSelectionY(-1),
-+ mScrolledToBottom( FALSE ),
-+ mHoverSegment( NULL )
- {
- mSourceID.generate();
-
-Index: ./indra/llimage/llimagetga.cpp
-===================================================================
---- ./indra/llimage/llimagetga.cpp (revision 376)
-+++ ./indra/llimage/llimagetga.cpp (working copy)
-@@ -35,7 +35,7 @@
- #include "llmath.h"
-
- // For expanding 5-bit pixel values to 8-bit with best rounding
--// static
-+// staticn
- const U8 LLImageTGA::s5to8bits[32] =
- {
- 0, 8, 16, 25, 33, 41, 49, 58,
-@@ -80,7 +80,7 @@
-
- LLImageTGA::~LLImageTGA()
- {
-- delete mColorMap;
-+ delete[] mColorMap;
- }
-
- BOOL LLImageTGA::updateData()
-Index: ./indra/llmessage/llcurl.cpp
-===================================================================
---- ./indra/llmessage/llcurl.cpp (revision 376)
-+++ ./indra/llmessage/llcurl.cpp (working copy)
-@@ -281,7 +281,7 @@
- curl_easy_cleanup(mCurlEasyHandle);
- --gCurlEasyCount;
- curl_slist_free_all(mHeaders);
-- for_each(mStrings.begin(), mStrings.end(), DeletePointer());
-+ for_each(mStrings.begin(), mStrings.end(), DeletePointerArray());
- }
-
- void LLCurl::Easy::resetState()
diff --git a/debian/patches/0001_possible_crash_and_leak_llassetstorage.patch.dpatch b/debian/patches/0001_possible_crash_and_leak_llassetstorage.patch.dpatch
deleted file mode 100644
index 16fbfa0..0000000
--- a/debian/patches/0001_possible_crash_and_leak_llassetstorage.patch.dpatch
+++ /dev/null
@@ -1,141 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 0001_possible_crash_and_leak_llassetstorage.patch.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: 0001_possible_crash_and_leak_llassetstorage.patch
-
- at DPATCH@
-
---- linden/indra/llmessage/llassetstorage.cpp 2007-09-20 12:36:46.000000000 +0200
-+++ linden/indra/llmessage/llassetstorage.cpp 2007-10-08 00:10:17.828125000 +0200
-@@ -512,16 +512,19 @@
- S32 result,
- const LLUUID& file_id,
- LLAssetType::EType file_type,
-- void* user_data, LLExtStat ext_status)
-+ void* callback_parm_req, LLExtStat ext_status)
- {
- lldebugs << "LLAssetStorage::downloadCompleteCallback() for " << file_id
- << "," << LLAssetType::lookup(file_type) << llendl;
-- LLAssetRequest* req = (LLAssetRequest*)user_data;
-+
-+ // be careful! req may be a ptr to memory already freed (a timeout does this)
-+ LLAssetRequest* req = (LLAssetRequest*)callback_parm_req;
- if(!req)
- {
- llwarns << "LLAssetStorage::downloadCompleteCallback called without"
- "a valid request." << llendl;
-- return;
-+ // we can live with a null pointer, we're not allowed to deref the ptr anyway (see above)
-+ // return;
- }
- if (!gAssetStorage)
- {
-@@ -529,12 +532,10 @@
- return;
- }
-
-- req->setUUID(file_id);
-- req->setType(file_type);
- if (LL_ERR_NOERR == result)
- {
- // we might have gotten a zero-size file
-- LLVFile vfile(gAssetStorage->mVFS, req->getUUID(), req->getType());
-+ LLVFile vfile(gAssetStorage->mVFS, file_id, file_type);
- if (vfile.getSize() <= 0)
- {
- llwarns << "downloadCompleteCallback has non-existent or zero-size asset " << req->getUUID() << llendl;
-@@ -553,7 +554,7 @@
- {
- request_list_t::iterator curiter = iter++;
- LLAssetRequest* tmp = *curiter;
-- if ((tmp->getUUID() == req->getUUID()) && (tmp->getType()== req->getType()))
-+ if ((tmp->getUUID() == file_id) && (tmp->getType() == file_type))
- {
- requests.push_front(tmp);
- iter = gAssetStorage->mPendingDownloads.erase(curiter);
-@@ -566,7 +567,7 @@
- LLAssetRequest* tmp = *curiter;
- if (tmp->mDownCallback)
- {
-- tmp->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), tmp->mUserData, result, ext_status);
-+ tmp->mDownCallback(gAssetStorage->mVFS, tmp->getUUID(), tmp->getType(), tmp->mUserData, result, ext_status);
- }
- delete tmp;
- }
-@@ -662,10 +663,10 @@
- S32 result,
- const LLUUID& file_id,
- LLAssetType::EType file_type,
-- void* user_data,
-+ void* callback_parm_req,
- LLExtStat ext_status)
- {
-- LLEstateAssetRequest *req = (LLEstateAssetRequest*)user_data;
-+ LLEstateAssetRequest *req = (LLEstateAssetRequest*)callback_parm_req;
- if(!req)
- {
- llwarns << "LLAssetStorage::downloadEstateAssetCompleteCallback called"
-@@ -679,12 +680,10 @@
- return;
- }
-
-- req->setUUID(file_id);
-- req->setType(file_type);
- if (LL_ERR_NOERR == result)
- {
- // we might have gotten a zero-size file
-- LLVFile vfile(gAssetStorage->mVFS, req->getUUID(), req->getAType());
-+ LLVFile vfile(gAssetStorage->mVFS, file_id, file_type);
- if (vfile.getSize() <= 0)
- {
- llwarns << "downloadCompleteCallback has non-existent or zero-size asset!" << llendl;
-@@ -694,7 +693,9 @@
- }
- }
-
-- req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getAType(), req->mUserData, result, ext_status);
-+ req->mDownCallback(gAssetStorage->mVFS, file_id, file_type, req->mUserData, result, ext_status);
-+
-+ delete req;
- }
-
- void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id,
-@@ -799,10 +800,10 @@
- S32 result,
- const LLUUID& file_id,
- LLAssetType::EType file_type,
-- void* user_data,
-+ void* callback_parm_req,
- LLExtStat ext_status)
- {
-- LLInvItemRequest *req = (LLInvItemRequest*)user_data;
-+ LLInvItemRequest *req = (LLInvItemRequest*)callback_parm_req;
- if(!req)
- {
- llwarns << "LLAssetStorage::downloadEstateAssetCompleteCallback called"
-@@ -815,12 +816,10 @@
- return;
- }
-
-- req->setUUID(file_id);
-- req->setType(file_type);
- if (LL_ERR_NOERR == result)
- {
- // we might have gotten a zero-size file
-- LLVFile vfile(gAssetStorage->mVFS, req->getUUID(), req->getType());
-+ LLVFile vfile(gAssetStorage->mVFS, file_id, file_type);
- if (vfile.getSize() <= 0)
- {
- llwarns << "downloadCompleteCallback has non-existent or zero-size asset!" << llendl;
-@@ -830,7 +829,9 @@
- }
- }
-
-- req->mDownCallback(gAssetStorage->mVFS, req->getUUID(), req->getType(), req->mUserData, result, ext_status);
-+ req->mDownCallback(gAssetStorage->mVFS, file_id, file_type, req->mUserData, result, ext_status);
-+
-+ delete req;
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/debian/patches/0001_possible_crash_in_llviewerpartssim.dpatch b/debian/patches/0001_possible_crash_in_llviewerpartssim.dpatch
deleted file mode 100644
index 0da8d6a..0000000
--- a/debian/patches/0001_possible_crash_in_llviewerpartssim.dpatch
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## possible crash in llviewerpartssim.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/newview/llviewerpartsim.cpp
-===================================================================
---- ./indra/newview/llviewerpartsim.cpp (revision 368)
-+++ ./indra/newview/llviewerpartsim.cpp (working copy)
-@@ -639,11 +639,18 @@
- S32 visirate = 1;
- if (vobj)
- {
-- LLSpatialGroup* group = vobj->mDrawable->getSpatialGroup();
-- if (group && !group->isVisible()) // && !group->isState(LLSpatialGroup::OBJECT_DIRTY))
-+ if(vobj->mDrawable)
- {
-- visirate = 8;
-+ LLSpatialGroup* group = vobj->mDrawable->getSpatialGroup();
-+ if (group && !group->isVisible()) // && !group->isState(LLSpatialGroup::OBJECT_DIRTY))
-+ {
-+ visirate = 8;
-+ }
- }
-+ else
-+ {
-+ llwarns << "Crash avoided, vobj->mDrawable is NULL" << llendl;
-+ }
- }
-
- if ((LLDrawable::getCurrentFrame()+mViewerPartGroups[i]->mID)%visirate == 0)
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index cc520fe..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,83 +0,0 @@
-
-# 1x: Patches taken from upstream releases or source repository
-
-# 2x: Patches taken from upstream mailing list and bug tracker
-21_VWR_2488_Standalone_build_fixes.dpatch
-22_build_more_approprate_binary_name.dpatch
-24_fix_64bit_times.dpatch
-24_always_test_vectorize.dpatch
-
-# BUILD-SYSTEM CHANGES
-# 3x: General build improvements, suitable for upstream
-34_dont_hide_symbols.dpatch
-38_build_opensource_without_crashlogger.dpatch
-
-# 4x: Debian-specific fixes
-#40_we_sometimes_need_LL_RELEASE_FOR_DOWNLOAD_code_paths.dpatch
-
-# CODE CHANGES HERE
-# 5x: General program fixes, suitable for upstream
-openal_1.20.0.dpatch
-gstreamer_audio_1.19.1.2.dpatch
-50_get_cpu_clock_count_for_more_than_just_i386.dpatch
-51_fix_vectorize.dpatch
-52_standalone_expat_headers.dpatch
-55_fix_the_locales.dpatch
-55_use_system_locale.dpatch
-59_need_llpreprocessor_to_access_endian_macros.dpatch
-
-# 6x: Use Debian system headers
-60_use_system_headers_for_apr-1.dpatch
-60_use_system_xulrunner.dpatch
-61_use_debain_cares_1.5.1.dpatch
-68_use_system_headers_for_openjpeg.dpatch
-
-# 7x: Debian/FHS compliance
-70_put_AppROData_in_usr_share_secondlife.dpatch
-71_use_debian_alternatives_for_www_browser.dpatch
-75_use_debian-included_fonts.dpatch
-79_use_debian_channel.dpatch
-
-# 8x: Development scratch pile
-
-#JIRA Patches, these are currently numbered by upsteram bugtracker JIRA
-#TODO prefix with 20_XXXX
-#These are all bug fixes rather than feature requests or general changes, i think we should
-#try to stay as close to upstream as is possible but of cause apply ALL extra bug fixes we have
-
-0001_possible_crash_and_leak_llassetstorage.patch.dpatch
-
-2543_possible_crash_in_group_voting_propsals.patch.dpatch
-2683_possible_crash_update_speaker_list.patch.dpatch
-1857_apr_thread_mutex_nested.patch.dpatch
-2003_possible_crash_draganddrop.patch.dpatch
-1294_llworkerthread_when_terminating_program.patch.dpatch
-
-4022_jpeg_error_gracefully.dpatch
-
-0000_keep_statbars_from_overshooting.patch.dpatch
-dam_flex_2.5.34.dpatch
-
-VWR4070-openjpeg_check_number_of_components.dpatch
-VWR6800_motioncontroller_leak.dpatch
-
-VWR5715_text_not_replaced_by_input_with_japanses_im.dpatch
-VWR5636_use_stop_menthod_for_llevent_timer.dpatch
-
-VWR-3766_llGetInventoryNumber_tooltip_missing_INVENTORY_ANIMATION.dpatch
-VWR1320_buggy_ati_driver_workaround.dpatch
-
-trademark_compliance.dpatch
-VWR-1815_top_corner_fix.dpatch
-
-0001_possible_crash_in_llviewerpartssim.dpatch
-VWR-5697_fix_startup_paths.dpatch
-VWR-7271_fix_mutlist_for_amd64.dpatch
-0000_valgrind_wild_vars.dpatch
-VWR-7831_smart_pointer_explicit_casting.dpatch
-
-VWR-5082_set_bulk_inv_permissions.dpatch
-VWR-4981_save_windlight_settings_in_user_rw_area.dpatch
-VWR-5917_multiple_user_day_cycles_in_rw_area.dpatch
-VWR-8194_clamp_outline_for_broken_nvidia.dpatch
-0000_no_idle_memcheck.dpatch
diff --git a/debian/patches/1294_llworkerthread_when_terminating_program.patch.dpatch b/debian/patches/1294_llworkerthread_when_terminating_program.patch.dpatch
deleted file mode 100644
index 727ed53..0000000
--- a/debian/patches/1294_llworkerthread_when_terminating_program.patch.dpatch
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 1294_llworkerthread_when_terminating_program.patch.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: 1294_llworkerthread_when_terminating_program.patch
-
- at DPATCH@
-
---- linden/indra/llcommon/llworkerthread.cpp 2007-08-02 14:16:42.000000000 +0200
-+++ linden/indra/llcommon/llworkerthread.cpp 2007-08-08 00:56:01.750000000 +0200
-@@ -105,7 +105,7 @@
- delete *iter;
- }
- // delete and aborted entries mean there's still work to do
-- res += delete_list.size() + abort_list.size();
-+ res += !mDeleteList.empty() + !delete_list.empty(); // deleted entries mean there's still work to do
- return res;
- }
-
diff --git a/debian/patches/1857_apr_thread_mutex_nested.patch.dpatch b/debian/patches/1857_apr_thread_mutex_nested.patch.dpatch
deleted file mode 100644
index 22f5517..0000000
--- a/debian/patches/1857_apr_thread_mutex_nested.patch.dpatch
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 1857_apr_thread_mutex_nested.patch.dpatch by <robin at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: 1857_apr_thread_mutex_nested.patch
-
- at DPATCH@
-
---- linden-orig/indra/llcommon/llapr.cpp 2007-09-13 15:35:18.000000000 +0200
-+++ linden/indra/llcommon/llapr.cpp 2007-09-16 17:59:54.640625000 +0200
-@@ -44,7 +44,7 @@
- apr_pool_create(&gAPRPoolp, NULL);
-
- // Initialize the logging mutex
-- apr_thread_mutex_create(&gLogMutexp, APR_THREAD_MUTEX_UNNESTED, gAPRPoolp);
-+ apr_thread_mutex_create(&gLogMutexp, APR_THREAD_MUTEX_NESTED, gAPRPoolp);
- }
- }
-
---- linden-orig/indra/llcommon/llthread.cpp 2007-09-13 15:35:18.000000000 +0200
-+++ linden/indra/llcommon/llthread.cpp 2007-09-16 17:59:53.203125000 +0200
-@@ -266,7 +266,7 @@
- mIsLocalPool = TRUE;
- apr_pool_create(&mAPRPoolp, NULL); // Create a subpool for this thread
- }
-- apr_thread_mutex_create(&mAPRMutexp, APR_THREAD_MUTEX_UNNESTED, mAPRPoolp);
-+ apr_thread_mutex_create(&mAPRMutexp, APR_THREAD_MUTEX_NESTED, mAPRPoolp);
- }
-
-
---- linden-orig/indra/llmessage/llpumpio.cpp 2007-09-13 15:35:18.000000000 +0200
-+++ linden/indra/llmessage/llpumpio.cpp 2007-09-16 17:59:51.656250000 +0200
-@@ -684,8 +684,8 @@
- if(!pool) return;
- #if LL_THREADS_APR
- // SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly.
-- apr_thread_mutex_create(&mChainsMutex, APR_THREAD_MUTEX_UNNESTED, pool);
-- apr_thread_mutex_create(&mCallbackMutex, APR_THREAD_MUTEX_UNNESTED, pool);
-+ apr_thread_mutex_create(&mChainsMutex, APR_THREAD_MUTEX_NESTED, pool);
-+ apr_thread_mutex_create(&mCallbackMutex, APR_THREAD_MUTEX_NESTED, pool);
- #endif
- mPool = pool;
- }
diff --git a/debian/patches/2003_possible_crash_draganddrop.patch.dpatch b/debian/patches/2003_possible_crash_draganddrop.patch.dpatch
deleted file mode 100644
index 3d60804..0000000
--- a/debian/patches/2003_possible_crash_draganddrop.patch.dpatch
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 2003_possible_crash_draganddrop.patch.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: 2003_possible_crash_draganddrop.patch
-
- at DPATCH@
-
---- linden/indra/newview/lltooldraganddrop.cpp 2007-07-11 15:19:48.000000000 +0200
-+++ linden/indra/newview/lltooldraganddrop.cpp 2007-08-03 21:09:45.109375000 +0200
-@@ -962,6 +962,12 @@
- {
- LLInventoryObject* cargo = locateInventory(item, cat);
-
-+ if (!cargo)
-+ {
-+ handled = FALSE;
-+ break;
-+ }
-+
- EAcceptance item_acceptance = ACCEPT_NO;
- handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE,
- mCargoTypes[mCurItemIndex],
diff --git a/debian/patches/21_VWR_2488_Standalone_build_fixes.dpatch b/debian/patches/21_VWR_2488_Standalone_build_fixes.dpatch
deleted file mode 100644
index 47a57ff..0000000
--- a/debian/patches/21_VWR_2488_Standalone_build_fixes.dpatch
+++ /dev/null
@@ -1,84 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## update standalone build.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-
-Index: ./indra/SConstruct
-===================================================================
---- ./indra/SConstruct (revision 374)
-+++ ./indra/SConstruct (working copy)
-@@ -138,17 +138,8 @@
- 'cairo',
- 'fontconfig',
- 'freetype2',
-- 'gdk-2.0',
-- 'gdk-pixbuf-2.0',
-- 'glib-2.0',
-- 'gmodule-2.0',
-- 'gthread-2.0',
- 'gtk+-2.0',
- 'libpng',
-- 'pango',
-- 'pangoft2',
-- 'pangox',
-- 'pangoxft',
- 'sdl',
- 'vorbis',
- 'vorbisenc',
-@@ -163,6 +154,9 @@
- 'libssl',
- ]
-
-+if enable_gstreamer:
-+ standalone_pkgs.append( 'gstreamer-0.10' )
-+
- def pkgconfig(opt, pkgs=None):
- if pkgs is None:
- pkgs = standalone_pkgs + standalone_net_pkgs
-@@ -177,6 +171,8 @@
- 'packages: %s' % ' '.join(missing))
- sys.exit(2)
-
-+
-+
- #####################
- # ITERATE TARGETS #
- #####################
-@@ -257,7 +253,7 @@
-
- # Generic GCC flags
- # cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror -fexceptions '
-- cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -fexceptions '
-+ cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -fexceptions -DLL_RELEASE_FOR_DOWNLOAD '
- cxxflags = ''
- #cppflags = '-D_FORTIFY_SOURCE=2 '
- cppflags = ''
-@@ -303,7 +299,7 @@
- if standalone:
- include_dirs += [d[2:] for d in
- pkgconfig('--cflags-only-I').split()]
-- client_external_libs += [ 'boost_program_options-gcc34-mt', 'boost_signals-gcc34-mt', 'boost_regex-gcc34-mt']
-+ client_external_libs += [ 'boost_program_options', 'boost_signals', 'boost_regex']
- else:
- client_external_libs += [ 'fontconfig', 'gtk-x11-2.0', 'atk-1.0', 'gmodule-2.0', 'gdk-x11-2.0', 'gdk_pixbuf-2.0', 'pango-1.0', 'pangoft2-1.0', 'pangox-1.0', 'pangoxft-1.0', 'Xinerama', 'boost_program_options-gcc34-mt', 'boost_signals-gcc34-mt', 'boost_regex-gcc34-mt' ]
- incdirs = [ 'ELFIO', 'atk-1.0', 'glib-2.0', 'gtk-2.0',
-@@ -327,10 +323,11 @@
- # GStreamer stuff
- if enable_gstreamer:
- cppflags += '-DLL_GSTREAMER_ENABLED=1 '
-- client_external_libs += [ 'glib-2.0', 'gobject-2.0', 'gthread-2.0' ]
-- include_dirs += [ '../libraries/' + system_str + '/include/gstreamer-0.10' ]
-- include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0', '../libraries/' + system_str + '/include/glib-2.0/include' ]
-- include_dirs += [ '../libraries/' + system_str + '/include/libxml2']
-+ if not standalone:
-+ client_external_libs += [ 'glib-2.0', 'gobject-2.0', 'gthread-2.0' ]
-+ include_dirs += [ '../libraries/' + system_str + '/include/gstreamer-0.10' ]
-+ include_dirs += [ '../libraries/' + system_str + '/include/glib-2.0', '../libraries/' + system_str + '/include/glib-2.0/include' ]
-+ include_dirs += [ '../libraries/' + system_str + '/include/libxml2']
- else:
- cppflags += '-DLL_GSTREAMER_ENABLED=0 '
-
diff --git a/debian/patches/22_build_more_approprate_binary_name.dpatch b/debian/patches/22_build_more_approprate_binary_name.dpatch
deleted file mode 100644
index f66f22e..0000000
--- a/debian/patches/22_build_more_approprate_binary_name.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## name the binary slviewer.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/SConstruct
-===================================================================
---- ./indra/SConstruct (revision 344)
-+++ ./indra/SConstruct (working copy)
-@@ -643,7 +643,7 @@
- ##################
- # BUILD NEWVIEW #
- ##################
-- output_bin = 'newview/secondlife-' + arch + '-bin'
-+ output_bin = 'newview/omvviewer'
-
- external_libs = client_external_libs + common_external_libs
-
diff --git a/debian/patches/24_always_test_vectorize.dpatch b/debian/patches/24_always_test_vectorize.dpatch
deleted file mode 100644
index 684951b..0000000
--- a/debian/patches/24_always_test_vectorize.dpatch
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## update vectorize patch.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/newview/llappviewer.cpp
-===================================================================
---- ./indra/newview/llappviewer.cpp (revision 319)
-+++ ./indra/newview/llappviewer.cpp (working copy)
-@@ -415,7 +415,6 @@
- LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //sqaure lod factor to get exponential range of [1,4]
- gGL.setClever(gSavedSettings.getBOOL("RenderUseCleverUI"));
-
--#if LL_VECTORIZE
- if (gSysCPU.hasAltivec())
- {
- gSavedSettings.setBOOL("VectorizeEnable", TRUE );
-@@ -441,13 +440,6 @@
- gSavedSettings.setU32("VectorizeProcessor", 0 );
- gSavedSettings.setBOOL("VectorizeSkin", FALSE);
- }
--#else
-- // This build target doesn't support SSE, don't test/run.
-- gSavedSettings.setBOOL("VectorizePerfTest", FALSE );
-- gSavedSettings.setBOOL("VectorizeEnable", FALSE );
-- gSavedSettings.setU32("VectorizeProcessor", 0 );
-- gSavedSettings.setBOOL("VectorizeSkin", FALSE);
--#endif
-
- // propagate push to talk preference to current status
- gSavedSettings.setBOOL("PTTCurrentlyEnabled", TRUE); //gSavedSettings.getBOOL("EnablePushToTalk"));
diff --git a/debian/patches/24_fix_64bit_times.dpatch b/debian/patches/24_fix_64bit_times.dpatch
deleted file mode 100644
index 3577cc9..0000000
--- a/debian/patches/24_fix_64bit_times.dpatch
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 24_fix_64bit_times.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix time display on 64bit builds
-
- at DPATCH@
-
-diff -U3 -r linden.new/indra/llcommon/lltimer.cpp linden/indra/llcommon/lltimer.cpp
---- linden.new/indra/llcommon/lltimer.cpp 2007-10-20 00:45:55.000000000 +0100
-+++ linden/indra/llcommon/lltimer.cpp 2007-10-21 10:41:17.000000000 +0100
-@@ -445,20 +445,20 @@
- {
- time_t unix_time = (time_t)utc_time;
-
-- S32 pacific_offset_hours;
-+ U32 pacific_offset_hours;
- if (pacific_daylight_time)
- {
-- pacific_offset_hours = -7;
-+ pacific_offset_hours = 7;
- }
- else
- {
-- pacific_offset_hours = -8;
-+ pacific_offset_hours = 8;
- }
-
- // We subtract off the PST/PDT offset _before_ getting
- // "UTC" time, because this will handle wrapping around
- // for 5 AM UTC -> 10 PM PDT of the previous day.
-- unix_time += pacific_offset_hours * MIN_PER_HOUR * SEC_PER_MIN;
-+ unix_time -= pacific_offset_hours * MIN_PER_HOUR * SEC_PER_MIN;
-
- // Internal buffer to PST/PDT (see above)
- struct tm* internal_time = gmtime(&unix_time);
diff --git a/debian/patches/2543_possible_crash_in_group_voting_propsals.patch.dpatch b/debian/patches/2543_possible_crash_in_group_voting_propsals.patch.dpatch
deleted file mode 100644
index c587e47..0000000
--- a/debian/patches/2543_possible_crash_in_group_voting_propsals.patch.dpatch
+++ /dev/null
@@ -1,116 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 2543_possible_crash_in_group_voting_propsals.patch.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: 2543_possible_crash_in_group_voting_propsals.patch
-
- at DPATCH@
-
---- linden-orig/indra/llui/llscrolllistctrl.cpp 2007-09-20 12:36:46.000000000 +0200
-+++ linden/indra/llui/llscrolllistctrl.cpp 2007-09-26 02:26:16.406250000 +0200
-@@ -543,6 +543,11 @@
-
- LLScrollListItem* LLScrollListCtrl::getFirstSelected() const
- {
-+ if (!getCanSelect())
-+ {
-+ return NULL;
-+ }
-+
- item_list::const_iterator iter;
- for(iter = mItemList.begin(); iter != mItemList.end(); iter++)
- {
-@@ -558,6 +563,13 @@
- std::vector<LLScrollListItem*> LLScrollListCtrl::getAllSelected() const
- {
- std::vector<LLScrollListItem*> ret;
-+
-+ if (!getCanSelect())
-+ {
-+ return ret;
-+ }
-+
-+
- item_list::const_iterator iter;
- for(iter = mItemList.begin(); iter != mItemList.end(); iter++)
- {
-@@ -572,6 +584,12 @@
-
- S32 LLScrollListCtrl::getFirstSelectedIndex() const
- {
-+ if (!getCanSelect())
-+ {
-+ return -1;
-+ }
-+
-+
- S32 CurSelectedIndex = 0;
- item_list::const_iterator iter;
- for (iter = mItemList.begin(); iter != mItemList.end(); iter++)
---- linden-orig/indra/newview/llpanelgroupvoting.cpp 2007-09-20 12:36:50.000000000 +0200
-+++ linden/indra/newview/llpanelgroupvoting.cpp 2007-09-26 02:14:20.218750000 +0200
-@@ -524,6 +524,7 @@
- //we're pining the server in high latency situations
- addPendingActiveScrollListItem(0, 0, ADD_BOTTOM);
- mProposals->setCanSelect(FALSE);
-+ mBtnViewProposalItem->setEnabled(FALSE);
-
- LLMessageSystem *msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_GroupActiveProposalsRequest);
-@@ -620,6 +621,7 @@
- //add some text so the user knows we're doing something
- addPendingHistoryScrollListItem(0, 0, ADD_BOTTOM);
- mVotesHistory->setCanSelect(FALSE);
-+ mBtnViewHistoryItem->setEnabled(FALSE);
-
- LLMessageSystem *msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_GroupVoteHistoryRequest);
-@@ -835,6 +837,7 @@
- //no active proposals and make the scroll list unselectable
- self->addNoActiveScrollListItem(ADD_BOTTOM);
- self->mProposals->setCanSelect(FALSE);
-+ self->mBtnViewProposalItem->setEnabled(FALSE);
- }
- else if ( (U32)received != num_expected )
- {
-@@ -842,6 +845,7 @@
- num_expected,
- ADD_BOTTOM);
- self->mProposals->setCanSelect(FALSE);
-+ self->mBtnViewProposalItem->setEnabled(FALSE);
- }
- else
- {
-@@ -855,6 +859,7 @@
- }
-
- self->mProposals->setCanSelect(TRUE);
-+ self->mBtnViewProposalItem->setEnabled(TRUE);
- }
- }
-
-@@ -904,7 +909,7 @@
- //no active proposals and make the scroll list unselectable
- self->addNoHistoryScrollListItem(ADD_BOTTOM);
- self->mVotesHistory->setCanSelect(FALSE);
--
-+ self->mBtnViewHistoryItem->setEnabled(FALSE);
- return;
- }
-
-@@ -1024,6 +1029,7 @@
- num_expected,
- ADD_BOTTOM);
- self->mVotesHistory->setCanSelect(FALSE);
-+ self->mBtnViewHistoryItem->setEnabled(FALSE);
- }
- else
- {
-@@ -1037,6 +1043,7 @@
- }
-
- self->mVotesHistory->setCanSelect(TRUE);
-+ self->mBtnViewHistoryItem->setEnabled(TRUE);
- }
- }
-
diff --git a/debian/patches/2683_possible_crash_update_speaker_list.patch.dpatch b/debian/patches/2683_possible_crash_update_speaker_list.patch.dpatch
deleted file mode 100644
index 368754f..0000000
--- a/debian/patches/2683_possible_crash_update_speaker_list.patch.dpatch
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 2683_possible_crash_update_speaker_list.patch.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: 2683_possible_crash_update_speaker_list.patch
-
- at DPATCH@
-
---- linden/indra/newview/llfloateractivespeakers.cpp 2007-09-20 12:36:50.000000000 +0200
-+++ linden/indra/newview/llfloateractivespeakers.cpp 2007-10-01 16:39:42.562500000 +0200
-@@ -806,7 +903,7 @@
- for(avatar_it = LLCharacter::sInstances.begin(); avatar_it != LLCharacter::sInstances.end(); ++avatar_it)
- {
- LLVOAvatar* avatarp = (LLVOAvatar*)*avatar_it;
-- if (dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) <= CHAT_NORMAL_RADIUS)
-+ if (!avatarp->isDead() && dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) <= CHAT_NORMAL_RADIUS)
- {
- setSpeaker(avatarp->getID());
- }
-@@ -820,7 +917,7 @@
- if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
- {
- LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id);
-- if (!avatarp || dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS)
-+ if (!avatarp || avatarp->isDead() || dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS)
- {
- speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL;
- speakerp->mDotColor = INACTIVE_COLOR;
---- linden/indra/newview/llviewerobjectlist.cpp 2007-09-20 12:36:50.000000000 +0200
-+++ linden/indra/newview/llviewerobjectlist.cpp 2007-10-01 16:45:38.562500000 +0200
-@@ -868,6 +868,10 @@
- if (objectp->mRegionp == regionp)
- {
- killObject(objectp);
-+
-+ // invalidate region pointer. region will become invalid, but
-+ // refcounted objects may survive the cleanDeadObjects() call below
-+ objectp->mRegionp = NULL;
- }
- }
-
diff --git a/debian/patches/34_dont_hide_symbols.dpatch b/debian/patches/34_dont_hide_symbols.dpatch
deleted file mode 100644
index 3820259..0000000
--- a/debian/patches/34_dont_hide_symbols.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 34_dont_hide_symbols.dpatch by Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No need to hide symbols when not static-linking most of the known world
-
- at DPATCH@
-diff -U3 -r ../linden/indra/SConstruct ./indra/SConstruct
---- ../linden/indra/SConstruct 2007-11-08 02:18:05.000000000 +0000
-+++ ./indra/SConstruct 2007-11-10 10:08:42.000000000 +0000
-@@ -365,7 +365,7 @@
- # used mainly to hide the symbols of the many common libraries we
- # static-link, which otherwise cause hard-to-trace fatal crashes due
- # to clashes in the run-time symbol namespace.
-- if platform == 'linux':
-+ if not standalone and platform == 'linux':
- exposed_symbols_file = 'newview/linux_tools/exposed-symbols.txt'
- hidesyms_cmd = 'objcopy --keep-global-symbols ' + exposed_symbols_file + ' $SOURCE $TARGET'
- else:
-
diff --git a/debian/patches/38_build_opensource_without_crashlogger.dpatch b/debian/patches/38_build_opensource_without_crashlogger.dpatch
deleted file mode 100644
index 2fce01c..0000000
--- a/debian/patches/38_build_opensource_without_crashlogger.dpatch
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 38_build_opensource_without_crashlogger.dpatch by Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Don't build or try to run the linux-crash-logger in an opensource build
-## DP: Rebased to 1.18.4.3 by Robin Cornelius <robin.cornelius at gmail.com>
-
- at DPATCH@
-diff -U3 -r ../linden/indra/SConstruct ./indra/SConstruct
---- ../linden/indra/SConstruct 2007-11-08 02:18:05.000000000 +0000
-+++ ./indra/SConstruct 2007-11-10 09:15:13.000000000 +0000
-@@ -605,7 +605,7 @@
- common_external_libs = net_external_libs + [ 'xmlrpc-epi', 'z' ]
-
- if build_target == 'client':
-- if platform == 'linux':
-+ if not opensource and platform == 'linux':
- #############################
- # BUILD LINUX_CRASH_LOGGER #
- #############################
-
---- ./indra/SConstruct (revision 49)
-+++ ./indra/SConstruct (working copy)
-@@ -590,7 +590,6 @@
- create_cond_module('llvfs')
- create_cond_module('llimagej2coj', module_libs=['openjpeg'])
- create_cond_module('llimage', module_libs=['llimagej2coj', 'jpeg', 'png12'])
-- create_static_module('llcrashlogger')
- create_static_module('llmessage')
- create_static_module('llinventory')
- create_static_module('llcharacter')
diff --git a/debian/patches/4022_jpeg_error_gracefully.dpatch b/debian/patches/4022_jpeg_error_gracefully.dpatch
deleted file mode 100644
index 79e46d4..0000000
--- a/debian/patches/4022_jpeg_error_gracefully.dpatch
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Handle unexpected files gracefully.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/llimage/llimagejpeg.cpp
-===================================================================
---- ./indra/llimage/llimagejpeg.cpp (revision 183)
-+++ ./indra/llimage/llimagejpeg.cpp (working copy)
-@@ -35,6 +35,8 @@
-
- #include "llerror.h"
-
-+static jmp_buf gSetjmpBuffer;
-+
- LLImageJPEG::LLImageJPEG()
- :
- LLImageFormatted(IMG_CODEC_JPEG),
-@@ -77,6 +79,14 @@
- jerr.emit_message = &LLImageJPEG::errorEmitMessage; // Conditionally emit a trace or warning message
- jerr.output_message = &LLImageJPEG::errorOutputMessage; // Routine that actually outputs a trace or error message
-
-+ // Establish the setjmp return context mSetjmpBuffer. Used by library to abort.
-+ if( setjmp(gSetjmpBuffer) )
-+ {
-+ // If we get here, the JPEG code has signaled an error.
-+ jpeg_destroy_decompress(&cinfo);
-+ return FALSE;
-+ }
-+
- try
- {
- // Now we can initialize the JPEG decompression object.
-@@ -209,6 +219,14 @@
- jerr.output_message = &LLImageJPEG::errorOutputMessage; // Routine that actually outputs a trace or error message
-
-
-+ // Establish the setjmp return context mSetjmpBuffer. Used by library to abort.
-+ if( setjmp(gSetjmpBuffer) )
-+ {
-+ // If we get here, the JPEG code has signaled an error.
-+ jpeg_destroy_decompress(&cinfo);
-+ return FALSE;
-+ }
-+
- try
- {
- // Now we can initialize the JPEG decompression object.
-@@ -402,7 +420,7 @@
- jpeg_destroy(cinfo);
-
- // Return control to the setjmp point
-- throw 1;
-+ longjmp(gSetjmpBuffer,1);
- }
-
- // Decide whether to emit a trace or warning message.
-@@ -501,7 +519,7 @@
- jerr.output_message = &LLImageJPEG::errorOutputMessage; // Routine that actually outputs a trace or error message
-
- // Establish the setjmp return context mSetjmpBuffer. Used by library to abort.
-- if( setjmp(mSetjmpBuffer) )
-+ if( setjmp(gSetjmpBuffer) )
- {
- // If we get here, the JPEG code has signaled an error.
- // We need to clean up the JPEG object, close the input file, and return.
diff --git a/debian/patches/50_get_cpu_clock_count_for_more_than_just_i386.dpatch b/debian/patches/50_get_cpu_clock_count_for_more_than_just_i386.dpatch
deleted file mode 100644
index 952e621..0000000
--- a/debian/patches/50_get_cpu_clock_count_for_more_than_just_i386.dpatch
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50_get_cpu_clock_count_for_more_than_just_i386.dpatch by Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Drop RDTSC reads on Linux and Solaris, and fallback to
-## DP: gettimeofday()-based implementation
-
- at DPATCH@
-diff -urNad linden~/indra/llcommon/llfasttimer.cpp linden/indra/llcommon/llfasttimer.cpp
---- linden~/indra/llcommon/llfasttimer.cpp 2007-05-12 13:44:24.000000000 +1000
-+++ linden/indra/llcommon/llfasttimer.cpp 2007-05-13 11:22:49.000000000 +1000
-@@ -91,20 +91,8 @@
- #endif // LL_WINDOWS
-
-
--#if (LL_LINUX || LL_SOLARIS) && (defined(__i386__) || defined(__amd64__))
--U64 get_cpu_clock_count()
--{
-- U64 x;
-- __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
-- return x;
--}
--#endif
--
--#if LL_DARWIN || (LL_SOLARIS && defined(__sparc__))
--//
--// Mac implementation of CPU clock
--//
--// Just use gettimeofday implementation for now
-+#if LL_LINUX || LL_DARWIN || LL_SOLARIS
-+// Both Linux and Mac use gettimeofday for accurate time
-
- U64 get_cpu_clock_count()
- {
diff --git a/debian/patches/51_fix_vectorize.dpatch b/debian/patches/51_fix_vectorize.dpatch
deleted file mode 100644
index 4275b38..0000000
--- a/debian/patches/51_fix_vectorize.dpatch
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## don't force sse on non x86 based archs.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/SConstruct
-===================================================================
---- ./indra/SConstruct (Revision 199)
-+++ ./indra/SConstruct (Arbeitskopie)
-@@ -422,18 +422,22 @@
-
- env_no_distcc = env.Copy(CXX = compiler_no_distcc)
-
-- vec_match = re.compile("_vec\.")
-+ vec_match = re.compile("_vec\.")
-+ sse_match = re.compile("_sse\.")
-+ sse2_match = re.compile("_sse2\.")
-+
- env_vec = env.Copy() # _vec is for default vector optimizations or none
--
-- sse_match = re.compile("_sse\.")
- env_sse = env.Copy()
-- env_sse.Append(CPPFLAGS = ' -msse -mfpmath=sse')
--
-- sse2_match = re.compile("_sse2\.")
- env_sse2 = env.Copy()
-- env_sse2.Append(CPPFLAGS = ' -msse2 -mfpmath=sse')
-+
-+ if arch == 'powerpc':
-+ env_vec.Append(CPPFLAGS = ' -faltivec ')
-+ elif arch == 'i686' or arch == 'x86_64':
-+ env_sse.Append(CPPFLAGS = ' -msse -mfpmath=sse')
-+ env_sse2.Append(CPPFLAGS = ' -msse2 -mfpmath=sse')
-+ else:
-+ print("What ARCH are you??? no Vectorisation possible");
-
--
- ### Distributed build hosts ###
-
- if enable_distcc:
-@@ -477,7 +481,7 @@
- return env_sse.Object(file)
- elif sse2_match.search(file) != None:
- return env_sse2.Object(file)
-- else:
-+ else:
- return file
-
- ### Load a files.lst and files.PLATFORM.lst for each module ###
diff --git a/debian/patches/52_standalone_expat_headers.dpatch b/debian/patches/52_standalone_expat_headers.dpatch
deleted file mode 100644
index 000a599..0000000
--- a/debian/patches/52_standalone_expat_headers.dpatch
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 52_standalone_expat_headers.dpatch by Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: llvoiceclient.cpp was missed by the "standalone" changes to the header paths
-
- at DPATCH@
-diff -urNad linden~/indra/newview/llvoiceclient.cpp linden/indra/newview/llvoiceclient.cpp
---- linden~/indra/newview/llvoiceclient.cpp 2007-08-10 08:14:24.000000000 +1000
-+++ linden/indra/newview/llvoiceclient.cpp 2007-08-10 08:17:43.000000000 +1000
-@@ -36,7 +36,11 @@
- #include "llvoavatar.h"
- #include "llbufferstream.h"
- #include "llfile.h"
-+#ifdef LL_STANDALONE
-+#include <expat.h>
-+#else
- #include "expat/expat.h"
-+#endif
- #include "llcallbacklist.h"
- #include "llviewerregion.h"
- #include "llviewernetwork.h" // for gUserServerChoice
diff --git a/debian/patches/55_fix_the_locales.dpatch b/debian/patches/55_fix_the_locales.dpatch
deleted file mode 100644
index 1489a3e..0000000
--- a/debian/patches/55_fix_the_locales.dpatch
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Why am i the only one with this locale bug.dpatch by <robin at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-
-Index: ./indra/llxml/llxmlnode.cpp
-===================================================================
---- ./indra/llxml/llxmlnode.cpp (revision 374)
-+++ ./indra/llxml/llxmlnode.cpp (working copy)
-@@ -571,6 +571,9 @@
- LLXMLNodePtr& node,
- LLXMLNode* defaults_tree)
- {
-+
-+ std::string saved_locale = setlocale(LC_ALL,"C");
-+
- // Read file
- LLFILE* fp = LLFile::fopen(filename.c_str(), "rb"); /* Flawfinder: ignore */
- if (fp == NULL)
-@@ -589,6 +592,9 @@
-
- bool rv = parseBuffer(buffer, nread, node, defaults_tree);
- delete [] buffer;
-+
-+ setlocale(LC_ALL, saved_locale.c_str() );
-+
- return rv;
- }
-
-Index: ./indra/llxml/llxmlparser.cpp
-===================================================================
---- ./indra/llxml/llxmlparser.cpp (revision 374)
-+++ ./indra/llxml/llxmlparser.cpp (working copy)
-@@ -76,6 +76,7 @@
- llassert( !mDepth );
-
- BOOL success = TRUE;
-+ std::string saved_locale = setlocale(LC_ALL,"C");
-
- LLFILE* file = LLFile::fopen(path.c_str(), "rb"); /* Flawfinder: ignore */
- if( !file )
-@@ -129,6 +130,9 @@
- llwarns << mAuxErrorString << llendl;
- }
-
-+ setlocale(LC_ALL, saved_locale.c_str() );
-+
-+
- return success;
- }
-
diff --git a/debian/patches/55_use_system_locale.dpatch b/debian/patches/55_use_system_locale.dpatch
deleted file mode 100644
index 1b416c1..0000000
--- a/debian/patches/55_use_system_locale.dpatch
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 55_use_system_locale.dpatch by Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Use current locale by default, not en_US.utf8
-## DP: Patch changed to use C locale as this screws up if you have a german
-## DP: locale. The viewer needs to set the user locale at a higher level but
-## DP: always use a C locale here.
-
- at DPATCH@
-diff -urNad linden~/indra/llui/llresmgr.cpp linden/indra/llui/llresmgr.cpp
---- linden~/indra/llui/llresmgr.cpp 2007-07-14 16:25:21.000000000 +1000
-+++ linden/indra/llui/llresmgr.cpp 2007-07-14 16:29:14.000000000 +1000
-@@ -444,7 +444,7 @@
- const LLString LLLocale::USER_LOCALE("en_US.ISO8859-1");
- const LLString LLLocale::SYSTEM_LOCALE("C");
- #else // LL_LINUX likes this
--const LLString LLLocale::USER_LOCALE("en_US.utf8");
-+const LLString LLLocale::USER_LOCALE("C");
- const LLString LLLocale::SYSTEM_LOCALE("C");
- #endif
-
diff --git a/debian/patches/59_need_llpreprocessor_to_access_endian_macros.dpatch b/debian/patches/59_need_llpreprocessor_to_access_endian_macros.dpatch
deleted file mode 100644
index cf875ad..0000000
--- a/debian/patches/59_need_llpreprocessor_to_access_endian_macros.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 59_need_llpreprocessor_to_access_endian_macros.dpatch by Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Message.h implements htonmemcpy, which uses the LL_BIG_ENDIAN macro
-## DP: to check if swizzle of the largely little-endian data is needed
-## DP: However, the LL_BIG_ENDIAN macro is not current dragged in by any headers
-## DP: already included
-
- at DPATCH@
-diff -urNad linden~/indra/llmessage/message.h linden/indra/llmessage/message.h
---- linden~/indra/llmessage/message.h 2007-05-20 22:07:39.000000000 +1000
-+++ linden/indra/llmessage/message.h 2007-05-20 22:17:14.000000000 +1000
-@@ -47,6 +47,7 @@
- #include "winsock2.h" // htons etc.
- #endif
-
-+#include "llpreprocessor.h"
- #include "llerror.h"
- #include "net.h"
- #include "string_table.h"
diff --git a/debian/patches/60_use_system_headers_for_apr-1.dpatch b/debian/patches/60_use_system_headers_for_apr-1.dpatch
deleted file mode 100644
index b016639..0000000
--- a/debian/patches/60_use_system_headers_for_apr-1.dpatch
+++ /dev/null
@@ -1,308 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 60_use_system_headers_for_apr-1.dpatch by Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: use system headers for apr-1
-
- at DPATCH@
-diff -ur ../linden/indra/llcommon/llares.cpp ./indra/llcommon/llares.cpp
---- ../linden/indra/llcommon/llares.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llcommon/llares.cpp 2007-11-10 12:20:39.000000000 +0000
-@@ -37,9 +37,9 @@
- # include <ares/ares_dns.h>
- #endif
-
--#include "apr-1/apr_portable.h"
--#include "apr-1/apr_network_io.h"
--#include "apr-1/apr_poll.h"
-+#include <apr_portable.h>
-+#include <apr_network_io.h>
-+#include <apr_poll.h>
-
- #include "linden_common.h"
- #include "llapr.h"
-diff -ur ../linden/indra/llcommon/llbase64.cpp ./indra/llcommon/llbase64.cpp
---- ../linden/indra/llcommon/llbase64.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llcommon/llbase64.cpp 2007-11-10 12:21:34.000000000 +0000
-@@ -36,7 +36,7 @@
-
- #include <string>
-
--#include "apr-1/apr_base64.h"
-+#include <apr_base64.h>
-
-
- // static
-diff -ur ../linden/indra/llcommon/lldate.cpp ./indra/llcommon/lldate.cpp
---- ../linden/indra/llcommon/lldate.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llcommon/lldate.cpp 2007-11-10 12:21:54.000000000 +0000
-@@ -34,7 +34,7 @@
- #include "linden_common.h"
- #include "lldate.h"
-
--#include "apr-1/apr_time.h"
-+#include <apr_time.h>
-
- #include <iomanip>
- #include <sstream>
-diff -ur ../linden/indra/llcommon/llsdserialize.cpp ./indra/llcommon/llsdserialize.cpp
---- ../linden/indra/llcommon/llsdserialize.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llcommon/llsdserialize.cpp 2007-11-10 12:22:11.000000000 +0000
-@@ -37,7 +37,7 @@
- #include "llstreamtools.h" // for fullread
-
- #include <iostream>
--#include "apr-1/apr_base64.h"
-+#include <apr_base64.h>
-
- #if !LL_WINDOWS
- #include <netinet/in.h> // htonl & ntohl
-diff -ur ../linden/indra/llcommon/llsdserialize_xml.cpp ./indra/llcommon/llsdserialize_xml.cpp
---- ../linden/indra/llcommon/llsdserialize_xml.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llcommon/llsdserialize_xml.cpp 2007-11-10 12:22:27.000000000 +0000
-@@ -35,7 +35,7 @@
- #include <iostream>
- #include <deque>
-
--#include "apr-1/apr_base64.h"
-+#include <apr_base64.h>
-
- extern "C"
- {
-diff -ur ../linden/indra/llimage/llimagej2c.cpp ./indra/llimage/llimagej2c.cpp
---- ../linden/indra/llimage/llimagej2c.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llimage/llimagej2c.cpp 2007-11-10 12:14:18.000000000 +0000
-@@ -29,8 +29,8 @@
- */
- #include "linden_common.h"
-
--#include <apr-1/apr_pools.h>
--#include <apr-1/apr_dso.h>
-+#include <apr_pools.h>
-+#include <apr_dso.h>
-
- #include "lldir.h"
- #include "llimagej2c.h"
-diff -ur ../linden/indra/llmedia/llmediaimplgstreamer_syms.cpp ./indra/llmedia/llmediaimplgstreamer_syms.cpp
---- ../linden/indra/llmedia/llmediaimplgstreamer_syms.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llmedia/llmediaimplgstreamer_syms.cpp 2007-11-10 12:23:01.000000000 +0000
-@@ -36,8 +36,8 @@
- extern "C" {
- #include <gst/gst.h>
-
--#include <apr-1/apr_pools.h>
--#include <apr-1/apr_dso.h>
-+#include <apr_pools.h>
-+#include <apr_dso.h>
- }
-
- #include "llmediaimplgstreamer.h"
-diff -ur ../linden/indra/llmessage/llfiltersd2xmlrpc.cpp ./indra/llmessage/llfiltersd2xmlrpc.cpp
---- ../linden/indra/llmessage/llfiltersd2xmlrpc.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llmessage/llfiltersd2xmlrpc.cpp 2007-11-10 12:23:28.000000000 +0000
-@@ -81,7 +81,7 @@
- #include <sstream>
- #include <iterator>
- #include <xmlrpc-epi/xmlrpc.h>
--#include "apr-1/apr_base64.h"
-+#include <apr_base64.h>
-
- #include "llbuffer.h"
- #include "llbufferstream.h"
-diff -ur ../linden/indra/llmessage/llmail.cpp ./indra/llmessage/llmail.cpp
---- ../linden/indra/llmessage/llmail.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llmessage/llmail.cpp 2007-11-10 12:23:54.000000000 +0000
-@@ -44,8 +44,8 @@
- #include <sstream>
- #include <boost/regex.hpp>
-
--#include "apr-1/apr_pools.h"
--#include "apr-1/apr_network_io.h"
-+#include <apr_pools.h>
-+#include <apr_network_io.h>
-
- #include "llapr.h"
- #include "llbase32.h" // IM-to-email address
-diff -ur ../linden/indra/llmessage/llpumpio.cpp ./indra/llmessage/llpumpio.cpp
---- ../linden/indra/llmessage/llpumpio.cpp 2007-11-08 02:18:07.000000000 +0000
-+++ ./indra/llmessage/llpumpio.cpp 2007-11-10 12:24:07.000000000 +0000
-@@ -35,7 +35,7 @@
- #include "llpumpio.h"
-
- #include <set>
--#include "apr-1/apr_poll.h"
-+#include <apr_poll.h>
-
- #include "llapr.h"
- #include "llmemtype.h"
-diff -ur ../linden/indra/llmessage/llurlrequest.cpp ./indra/llmessage/llurlrequest.cpp
---- ../linden/indra/llmessage/llurlrequest.cpp 2007-11-08 02:18:07.000000000 +0000
-+++ ./indra/llmessage/llurlrequest.cpp 2007-11-10 12:24:20.000000000 +0000
-@@ -42,7 +42,7 @@
- #include "llpumpio.h"
- #include "llsd.h"
- #include "llstring.h"
--#include "apr-1/apr_env.h"
-+#include <apr_env.h>
-
- static const U32 HTTP_STATUS_PIPE_ERROR = 499;
-
-diff -ur ../linden/indra/llmessage/message.cpp ./indra/llmessage/message.cpp
---- ../linden/indra/llmessage/message.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llmessage/message.cpp 2007-11-10 12:24:48.000000000 +0000
-@@ -46,9 +46,9 @@
- #include <sstream>
-
- #include "llapr.h"
--#include "apr-1/apr_portable.h"
--#include "apr-1/apr_network_io.h"
--#include "apr-1/apr_poll.h"
-+#include <apr_portable.h>
-+#include <apr_network_io.h>
-+#include <apr_poll.h>
-
- // linden library headers
- #include "indra_constants.h"
-diff -ur ../linden/indra/newview/llvoiceclient.cpp ./indra/newview/llvoiceclient.cpp
---- ../linden/indra/newview/llvoiceclient.cpp 2007-11-08 02:18:13.000000000 +0000
-+++ ./indra/newview/llvoiceclient.cpp 2007-11-10 12:26:06.000000000 +0000
-@@ -59,10 +59,10 @@
- #include "llviewerwindow.h"
-
- // for base64 decoding
--#include "apr-1/apr_base64.h"
-+#include <apr_base64.h>
-
- // for SHA1 hash
--#include "apr-1/apr_sha1.h"
-+#include <apr_sha1.h>
-
- // If we are connecting to agni AND the user's last name is "Linden", join this channel instead of looking up the sim name.
- // If we are connecting to agni and the user's last name is NOT "Linden", disable voice.
-diff -ur ../linden/indra/test/io.cpp ./indra/test/io.cpp
---- ../linden/indra/test/io.cpp 2007-11-08 02:18:15.000000000 +0000
-+++ ./indra/test/io.cpp 2007-11-10 12:25:11.000000000 +0000
-@@ -36,7 +36,7 @@
-
- #include <iterator>
-
--#include <apr-1/apr_pools.h>
-+#include <apr_pools.h>
-
- #include "llbuffer.h"
- #include "llbufferstream.h"
-diff -ur ../linden/indra/test/test.cpp ./indra/test/test.cpp
---- ../linden/indra/test/test.cpp 2007-11-08 02:18:15.000000000 +0000
-+++ ./indra/test/test.cpp 2007-11-10 12:25:26.000000000 +0000
-@@ -43,8 +43,8 @@
- #include "llerrorcontrol.h"
- #include "lltut.h"
-
--#include <apr-1/apr_pools.h>
--#include <apr-1/apr_getopt.h>
-+#include <apr_pools.h>
-+#include <apr_getopt.h>
-
- // the CTYPE_WORKAROUND is needed for linux dev stations that don't
- // have the broken libc6 packages needed by our out-of-date static
-
-diff -ur ../linden/indra/llcommon/llapr.h ./indra/llcommon/llapr.h
---- ../linden/indra/llcommon/llapr.h 2007-11-15 11:44:41.000000000 +0000
-+++ ./indra/llcommon/llapr.h 2007-11-15 11:45:01.000000000 +0000
-@@ -40,11 +40,11 @@
-
- #include <boost/noncopyable.hpp>
-
--#include "apr-1/apr_thread_proc.h"
--#include "apr-1/apr_thread_mutex.h"
--#include "apr-1/apr_getopt.h"
--#include "apr-1/apr_signal.h"
--#include "apr-1/apr_atomic.h"
-+#include "apr-1.0/apr_thread_proc.h"
-+#include "apr-1.0/apr_thread_mutex.h"
-+#include "apr-1.0/apr_getopt.h"
-+#include "apr-1.0/apr_signal.h"
-+#include "apr-1.0/apr_atomic.h"
- #include "llstring.h"
-
- extern apr_thread_mutex_t* gLogMutexp;
-Only in ./indra/: lib_release_client
-diff -ur ../linden/indra/llcommon/llthread.h ./indra/llcommon/llthread.h
---- ../linden/indra/llcommon/llthread.h 2007-11-14 00:16:05.000000000 +0000
-+++ ./indra/llcommon/llthread.h 2007-11-15 12:01:10.000000000 +0000
-@@ -36,7 +36,7 @@
- #include "llapp.h"
- #include "llmemory.h"
-
--#include "apr-1/apr_thread_cond.h"
-+#include "apr-1.0/apr_thread_cond.h"
-
- class LLThread;
- class LLMutex;
-Only in ./indra/: lib_release_client
-diff -ur ../linden/indra/llmessage/lliopipe.h ./indra/llmessage/lliopipe.h
---- ../linden/indra/llmessage/lliopipe.h 2007-11-14 00:16:06.000000000 +0000
-+++ ./indra/llmessage/lliopipe.h 2007-11-15 12:10:04.000000000 +0000
-@@ -36,7 +36,7 @@
-
- #include <boost/intrusive_ptr.hpp>
- #include <boost/shared_ptr.hpp>
--#include "apr-1/apr_poll.h"
-+#include "apr-1.0/apr_poll.h"
-
- #include "llsd.h"
-
-Only in ./indra/: lib_release_client
-diff -ur ../linden/indra/llmedia/llmediaimplgstreamer.h ./indra/llmedia/llmediaimplgstreamer.h
---- ../linden/indra/llmedia/llmediaimplgstreamer.h 2007-11-14 00:16:06.000000000 +0000
-+++ ./indra/llmedia/llmediaimplgstreamer.h 2007-11-15 12:18:48.000000000 +0000
-@@ -38,8 +38,8 @@
- extern "C" {
- #include <gst/gst.h>
-
--#include <apr-1/apr_pools.h>
--#include <apr-1/apr_dso.h>
-+#include <apr-1.0/apr_pools.h>
-+#include <apr-1.0/apr_dso.h>
- }
-
- #include "stdtypes.h"
-diff -ur ../linden/indra/llmessage/lliosocket.h ./indra/llmessage/lliosocket.h
---- ../linden/indra/llmessage/lliosocket.h 2007-11-14 00:16:06.000000000 +0000
-+++ ./indra/llmessage/lliosocket.h 2007-11-15 12:17:41.000000000 +0000
-@@ -43,8 +43,8 @@
- */
-
- #include "lliopipe.h"
--#include "apr-1/apr_pools.h"
--#include "apr-1/apr_network_io.h"
-+#include "apr-1.0/apr_pools.h"
-+#include "apr-1.0/apr_network_io.h"
- #include "llchainio.h"
-
- class LLHost;
-diff -ur ../linden/indra/llmessage/llpumpio.h ./indra/llmessage/llpumpio.h
---- ../linden/indra/llmessage/llpumpio.h 2007-11-14 00:16:06.000000000 +0000
-+++ ./indra/llmessage/llpumpio.h 2007-11-15 12:17:56.000000000 +0000
-@@ -39,7 +39,7 @@
- #include <sys/param.h>
- #endif
-
--#include "apr-1/apr_pools.h"
-+#include "apr-1.0/apr_pools.h"
- #include "llbuffer.h"
- #include "llframetimer.h"
- #include "lliopipe.h"
-Index: ./llcommon/llthread.cpp
-===================================================================
---- ./indra/llcommon/llthread.cpp (revision 242)
-+++ ./indra/llcommon/llthread.cpp (working copy)
-@@ -31,7 +31,7 @@
- #include "linden_common.h"
- #include "llapr.h"
-
--#include "apr-1/apr_portable.h"
-+#include "apr-1.0/apr_portable.h"
-
- #include "llthread.h"
-
diff --git a/debian/patches/60_use_system_xulrunner.dpatch b/debian/patches/60_use_system_xulrunner.dpatch
deleted file mode 100644
index d431cb7..0000000
--- a/debian/patches/60_use_system_xulrunner.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 60_use_system_xulrunner.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Use system xulrunner and shared llmozlib
-
- at DPATCH@
-
-Index: ./indra/SConstruct
-===================================================================
---- ./indra/SConstruct (revision 242)
-+++ ./indra/SConstruct (working copy)
-@@ -303,7 +303,6 @@
- if enable_mozlib:
- cppflags += '-DLL_LLMOZLIB_ENABLED=1 '
- client_external_libs += [ 'llmozlib2' ]
-- client_external_libs += [ 'mozjs', 'nspr4', 'plc4', 'plds4', 'profdirserviceprovider_s', 'xul' ]
- else:
- cppflags += '-DLL_LLMOZLIB_ENABLED=0 '
-
diff --git a/debian/patches/61_use_debain_cares_1.5.1.dpatch b/debian/patches/61_use_debain_cares_1.5.1.dpatch
deleted file mode 100644
index 56ebd79..0000000
--- a/debian/patches/61_use_debain_cares_1.5.1.dpatch
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## ares extra param.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: ares extra param
-
- at DPATCH@
-
-+++ ./indra/llcommon/llares.cpp 2007-11-27 18:49:20.000000000 +0000
---- ./indra/llcommon/llares.cpp 2007-11-20 12:52:27.000000000 +0000
-@@ -117,7 +117,7 @@
- ares_cancel(chan_);
- }
-
-+static void host_callback(void *arg, int status,int timeouts, struct hostent *ent)
--static void host_callback(void *arg, int status, struct hostent *ent)
- {
- LLPointer<LLAres::HostResponder> *resp =
- (LLPointer<LLAres::HostResponder> *) arg;
-@@ -380,7 +380,7 @@
- << LLAres::strerror(code) << llendl;
- }
-
-+static void nameinfo_callback(void *arg, int status,int timeouts, char *node, char *service)
--static void nameinfo_callback(void *arg, int status, char *node, char *service)
- {
- LLPointer<LLAres::NameInfoResponder> *resp =
- (LLPointer<LLAres::NameInfoResponder> *) arg;
-@@ -402,7 +402,7 @@
- new LLPointer<NameInfoResponder>(resp));
- }
-
-+static void search_callback(void *arg, int status,int timeouts, unsigned char *abuf,
--static void search_callback(void *arg, int status, unsigned char *abuf,
- int alen)
- {
- LLPointer<LLAres::QueryResponder> *resp =
diff --git a/debian/patches/68_use_system_headers_for_openjpeg.dpatch b/debian/patches/68_use_system_headers_for_openjpeg.dpatch
deleted file mode 100644
index b148f8a..0000000
--- a/debian/patches/68_use_system_headers_for_openjpeg.dpatch
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 68_use_system_headers_for_openjpeg.dpatch by Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: use system headers for openjpeg
-
- at DPATCH@
-diff -U3 -r ../linden/indra/llimagej2coj/llimagej2coj.cpp ./indra/llimagej2coj/llimagej2coj.cpp
---- ../linden/indra/llimagej2coj/llimagej2coj.cpp 2007-11-08 02:18:06.000000000 +0000
-+++ ./indra/llimagej2coj/llimagej2coj.cpp 2007-11-10 09:24:21.000000000 +0000
-@@ -33,7 +33,7 @@
- #include "llimagej2coj.h"
-
- // this is defined so that we get static linking.
--#include "openjpeg/openjpeg.h"
-+#include <openjpeg.h>
-
- #include "lltimer.h"
- #include "llmemory.h"
-
-
-
diff --git a/debian/patches/70_put_AppROData_in_usr_share_secondlife.dpatch b/debian/patches/70_put_AppROData_in_usr_share_secondlife.dpatch
deleted file mode 100644
index d3b1a5e..0000000
--- a/debian/patches/70_put_AppROData_in_usr_share_secondlife.dpatch
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 70_put_AppROData_in_usr_share_secondlife.dpatch by Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Move AppROData to /usr/share/secondlife
-
- at DPATCH@
-diff -urNad linden~/indra/llvfs/lldir_linux.cpp linden/indra/llvfs/lldir_linux.cpp
---- linden~/indra/llvfs/lldir_linux.cpp 2007-07-14 16:25:21.000000000 +1000
-+++ linden/indra/llvfs/lldir_linux.cpp 2007-07-14 16:36:51.000000000 +1000
-@@ -90,7 +90,7 @@
- mExecutablePathAndName = "";
- mExecutableDir = tmp_str;
- mWorkingDir = tmp_str;
-- mAppRODataDir = tmp_str;
-+ mAppRODataDir = "/usr/share/omvviewer";
- mOSUserDir = getCurrentUserHome(tmp_str);
- mOSUserAppDir = "";
- mLindenUserDir = tmp_str;
diff --git a/debian/patches/71_use_debian_alternatives_for_www_browser.dpatch b/debian/patches/71_use_debian_alternatives_for_www_browser.dpatch
deleted file mode 100644
index 67e3229..0000000
--- a/debian/patches/71_use_debian_alternatives_for_www_browser.dpatch
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Use Debian alternitives for web browser AND use system() and let system() do the forking.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-
-Index: ./indra/newview/linux_tools/launch_url.sh
-===================================================================
---- ./indra/newview/linux_tools/launch_url.sh (revision 135)
-+++ ./indra/newview/linux_tools/launch_url.sh (working copy)
-@@ -8,6 +8,7 @@
- # On Unixoids we try, in order of decreasing priority:
- # - $BROWSER if set (preferred)
- # - kfmclient openURL
-+# - gnome-open
- # - x-www-browser
- # - opera
- # - firefox
-@@ -48,6 +49,13 @@
- exit
- fi
-
-+# else gnome-open
-+# (embodies gnome concept of 'preferred browser')
-+if which gnome-open >/dev/null; then
-+ gnome-open "$URL" &
-+ exit
-+fi
-+
- # else x-www-browser
- # (Debianesque idea of a working X browser)
- if which x-www-browser >/dev/null; then
diff --git a/debian/patches/75_use_debian-included_fonts.dpatch b/debian/patches/75_use_debian-included_fonts.dpatch
deleted file mode 100644
index 2b65ba1..0000000
--- a/debian/patches/75_use_debian-included_fonts.dpatch
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## fix fonts.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-
-Index: ./indra/newview/app_settings/settings.xml
-===================================================================
---- ./indra/newview/app_settings/settings.xml (revision 374)
-+++ ./indra/newview/app_settings/settings.xml (working copy)
-@@ -3464,7 +3464,7 @@
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
-- <string>profontwindows.ttf</string>
-+ <string>/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf</string>
- </map>
- <key>FontSansSerif</key>
- <map>
-@@ -3475,7 +3475,7 @@
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
-- <string>MtBkLfRg.ttf</string>
-+ <string>/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf</string>
- </map>
- <key>FontSansSerifBold</key>
- <map>
-@@ -3486,7 +3486,7 @@
- <key>Type</key>
- <string>String</string>
- <key>Value</key>
-- <string>MtBdLfRg.ttf</string>
-+ <string>/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf</string>
- </map>
- <key>FontSansSerifFallback</key>
- <map>
diff --git a/debian/patches/79_use_debian_channel.dpatch b/debian/patches/79_use_debian_channel.dpatch
deleted file mode 100644
index 8edfbae..0000000
--- a/debian/patches/79_use_debian_channel.dpatch
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## change channel version.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
- #endif
-Index: ./indra/llcommon/llversionviewer.h
-===================================================================
---- ./indra/llcommon/llversionviewer.h (revision 217)
-+++ ./indra/llcommon/llversionviewer.h (working copy)
-@@ -39,3 +39,3 @@
-
--const char * const LL_CHANNEL = "Second Life Release";
-+const char * const LL_CHANNEL = "Open Metaverse Viewer";
-
diff --git a/debian/patches/VWR-1815_top_corner_fix.dpatch b/debian/patches/VWR-1815_top_corner_fix.dpatch
deleted file mode 100644
index 94f4ccf..0000000
--- a/debian/patches/VWR-1815_top_corner_fix.dpatch
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## top corner workaround.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-
-Index: ./indra/newview/lltexturefetch.cpp
-===================================================================
---- ./indra/newview/lltexturefetch.cpp (revision 374)
-+++ ./indra/newview/lltexturefetch.cpp (working copy)
-@@ -54,6 +54,9 @@
- {
- friend class LLTextureFetch;
-
-+public:
-+ BOOL mAccelerateDownloadStuckTexture;
-+
- private:
- #if 0
- class URLResponder : public LLHTTPClient::Responder
-@@ -1059,6 +1062,14 @@
- }
- bool have_all_data = mLastPacket >= mTotalPackets-1;
- llassert_always(mRequestedSize > 0);
-+
-+ if((buffer_size >= mRequestedSize) && mRequestedDiscard <=0)
-+ {
-+ if(!mAccelerateDownloadStuckTexture);
-+ llwarns << "Accelerating download of a stuck texture :"<<mID << llendl
-+ mAccelerateDownloadStuckTexture=TRUE;
-+ }
-+
- if (buffer_size >= mRequestedSize || have_all_data)
- {
- /// We have enough (or all) data
-@@ -1552,6 +1563,7 @@
- const F32 LAZY_FLUSH_TIMEOUT = 15.f; // 10.0f // temp
- const F32 MIN_REQUEST_TIME = 1.0f;
- const F32 MIN_DELTA_PRIORITY = 1000.f;
-+ const F32 MIN_ACCEL_KICK = 0.5f;
-
- LLMutexLock lock(&mQueueMutex);
-
-@@ -1582,7 +1594,9 @@
- F32 delta_priority = llabs(req->mRequestedPriority - req->mImagePriority);
- if ((req->mSimRequestedDiscard != req->mDesiredDiscard) ||
- (delta_priority > MIN_DELTA_PRIORITY && elapsed >= MIN_REQUEST_TIME) ||
-- (elapsed >= LAZY_FLUSH_TIMEOUT))
-+ (elapsed >= LAZY_FLUSH_TIMEOUT) ||
-+ (req->mAccelerateDownloadStuckTexture && (elapsed >=MIN_ACCEL_KICK))
-+ )
- {
- requests[req->mHost].insert(req);
- }
diff --git a/debian/patches/VWR-3766_llGetInventoryNumber_tooltip_missing_INVENTORY_ANIMATION.dpatch b/debian/patches/VWR-3766_llGetInventoryNumber_tooltip_missing_INVENTORY_ANIMATION.dpatch
deleted file mode 100644
index 7cdecaf..0000000
--- a/debian/patches/VWR-3766_llGetInventoryNumber_tooltip_missing_INVENTORY_ANIMATION.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## llGetInventoryNumber tooltip missing INVENTORY_ANIMATION.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch by McCabe Maxsted
-
- at DPATCH@
-
-Index: ./indra/lscript/lscript_library/lscript_library.cpp
-===================================================================
---- ./indra/lscript/lscript_library/lscript_library.cpp (revision 327)
-+++ ./indra/lscript/lscript_library/lscript_library.cpp (working copy)
-@@ -221,7 +221,7 @@
- addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llBreakAllLinks", NULL, NULL, "llBreakAllLinks()\nDelinks all tasks in the link set (requires permission PERMISSION_CHANGE_LINKS be set)"));
- addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetLinkKey", "k", "i", "key llGetLinkKey(integer linknum)\nGet the key of linknumber in link set"));
- addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetLinkName", "s", "i", "string llGetLinkName(integer linknum)\nGet the name of linknumber in link set"));
-- addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetInventoryNumber", "i", "i", "integer llGetInventoryNumber(integer type)\nGet the number of items of a given type in the task's inventory.\nValid types: INVENTORY_TEXTURE, INVENTORY_SOUND, INVENTORY_OBJECT, INVENTORY_SCRIPT, INVENTORY_CLOTHING, INVENTORY_BODYPART, INVENTORY_NOTECARD, INVENTORY_LANDMARK, INVENTORY_ALL"));
-+ addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetInventoryNumber", "i", "i", "integer llGetInventoryNumber(integer type)\nGet the number of items of a given type in the task's inventory.\nValid types: INVENTORY_TEXTURE, INVENTORY_SOUND, INVENTORY_OBJECT, INVENTORY_SCRIPT, INVENTORY_CLOTHING, INVENTORY_BODYPART, INVENTORY_NOTECARD, INVENTORY_LANDMARK, INVENTORY_ANIMATION, INVENTORY_GESTURE, INVENTORY_ALL"));
- addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetInventoryName", "s", "ii", "string llGetInventoryName(integer type, integer number)\nGet the name of the inventory item number of type"));
- addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetScriptState", NULL, "si", "llSetScriptState(string name, integer run)\nControl the state of a script name."));
- addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetEnergy", "f", NULL, "float llGetEnergy()\nReturns how much energy is in the object as a percentage of maximum"));
diff --git a/debian/patches/VWR-4981_save_windlight_settings_in_user_rw_area.dpatch b/debian/patches/VWR-4981_save_windlight_settings_in_user_rw_area.dpatch
deleted file mode 100644
index 367d245..0000000
--- a/debian/patches/VWR-4981_save_windlight_settings_in_user_rw_area.dpatch
+++ /dev/null
@@ -1,402 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## VWR 4681.dpatch by <robin.cornelius at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Save the user modifications in a RW user location
-
- at DPATCH@
-
-diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
-index 1eb0654..cc8ce60 100644
---- a/indra/newview/llstartup.cpp
-+++ b/indra/newview/llstartup.cpp
-@@ -809,6 +806,20 @@ BOOL idle_startup()
- LLFile::mkdir(gDirUtilp->getChatLogsDir().c_str());
- LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir().c_str());
-
-+ //good as place as any to create user windlight directories
-+ std::string user_windlight_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", ""));
-+ LLFile::mkdir(user_windlight_path_name.c_str());
-+
-+ std::string user_windlight_skies_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", ""));
-+ LLFile::mkdir(user_windlight_skies_path_name.c_str());
-+
-+ std::string user_windlight_water_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", ""));
-+ LLFile::mkdir(user_windlight_water_path_name.c_str());
-+
-+ std::string user_windlight_days_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", ""));
-+ LLFile::mkdir(user_windlight_days_path_name.c_str());
-+
-+
- if (show_connect_box)
- {
- if ( LLPanelLogin::isGridComboDirty() )
-diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
-index fb09fd8..a11b575 100644
---- a/indra/newview/llwaterparammanager.cpp
-+++ b/indra/newview/llwaterparammanager.cpp
-@@ -86,48 +86,59 @@ LLWaterParamManager::~LLWaterParamManager()
-
- void LLWaterParamManager::loadAllPresets(const LLString& file_name)
- {
-- LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", ""));
-- LL_INFOS2("AppInit", "Shaders") << "Loading water settings from " << path_name << LL_ENDL;
-
-- //mParamList.clear();
--
-+ LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", ""));
-+ LL_INFOS2("AppInit", "Shaders") << "Loading Default water settings from " << path_name << LL_ENDL;
-+
- bool found = true;
- while(found)
- {
- std::string name;
- found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
--
-- LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
--
-- // if we have one
-- if(found)
-+ if(found)
- {
-+
-+ name=name.erase(name.length()-4);
-+
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_unescape(name.c_str(), name.size());
- std::string unescaped_name(curl_str);
- curl_free(curl_str);
- curl_str = NULL;
-
-- // not much error checking here since we're getting rid of this
-- std::string water_name = unescaped_name.substr(0, unescaped_name.size() - 4);
--
-- LLString cur_path(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", name));
-- LL_DEBUGS2("AppInit", "Shaders") << "Loading water from " << cur_path << LL_ENDL;
-+ LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
-+ loadPreset(unescaped_name,FALSE);
-+ }
-+ }
-+
-+ // And repeat for user presets, note the user presets will modify any system presets already loaded
-+
-+ LLString path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", ""));
-+ LL_INFOS2("AppInit", "Shaders") << "Loading User water settings from " << path_name2 << LL_ENDL;
-
-- std::ifstream water_xml(cur_path.c_str());
-- if (water_xml)
-- {
-- LLSD water_data(LLSD::emptyMap());
-- LLPointer<LLSDParser> parser = new LLSDXMLParser();
-- parser->parse(water_xml, water_data, LLSDSerialize::SIZE_UNLIMITED);
-+ found = true;
-+ while(found)
-+ {
-+ std::string name;
-+ found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name, false);
-+ if(found)
-+ {
-+ name=name.erase(name.length()-4);
-
-- addParamSet(water_name, water_data);
-- }
-+ // bugfix for SL-46920: preventing filenames that break stuff.
-+ char * curl_str = curl_unescape(name.c_str(), name.size());
-+ std::string unescaped_name(curl_str);
-+ curl_free(curl_str);
-+ curl_str = NULL;
-+
-+ LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
-+ loadPreset(unescaped_name,FALSE);
- }
- }
-+
- }
-
--void LLWaterParamManager::loadPreset(const LLString & name)
-+void LLWaterParamManager::loadPreset(const LLString & name,bool propagate)
- {
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_escape(name.c_str(), name.size());
-@@ -139,8 +150,17 @@ void LLWaterParamManager::loadPreset(const LLString & name)
-
- std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", escaped_filename));
- llinfos << "Loading water settings from " << pathName << llendl;
--
-- std::ifstream presetsXML(pathName.c_str());
-+
-+ std::ifstream presetsXML;
-+ presetsXML.open(pathName.c_str());
-+
-+ // That failed, try loading from the users area instead.
-+ if(!presetsXML)
-+ {
-+ pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", escaped_filename);
-+ llinfos << "Loading User water setting from " << pathName << llendl;
-+ presetsXML.open(pathName.c_str());
-+ }
-
- if (presetsXML)
- {
-@@ -166,10 +186,12 @@ void LLWaterParamManager::loadPreset(const LLString & name)
- return;
- }
-
-- getParamSet(name, mCurParams);
--
-- propagateParameters();
--}
-+ if(propagate)
-+ {
-+ getParamSet(name, mCurParams);
-+ propagateParameters();
-+ }
-+}
-
- void LLWaterParamManager::savePreset(const LLString & name)
- {
-@@ -183,7 +205,7 @@ void LLWaterParamManager::savePreset(const LLString & name)
-
- // make an empty llsd
- LLSD paramsData(LLSD::emptyMap());
-- std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", escaped_filename));
-+ std::string pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", escaped_filename));
-
- // fill it with LLSD windlight params
- paramsData = mParamList[name].getAll();
-@@ -386,7 +408,7 @@ bool LLWaterParamManager::removeParamSet(const std::string& name, bool delete_fr
-
- if(delete_from_disk)
- {
-- LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", ""));
-+ LLString path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", ""));
-
- // use full curl escaped name
- char * curl_str = curl_escape(name.c_str(), name.size());
-diff --git a/indra/newview/llwaterparammanager.h b/indra/newview/llwaterparammanager.h
-index 6c9ce3e..62f23d9 100644
---- a/indra/newview/llwaterparammanager.h
-+++ b/indra/newview/llwaterparammanager.h
-@@ -228,7 +228,7 @@ public:
- void loadAllPresets(const LLString & fileName);
-
- /// load an individual preset into the sky
-- void loadPreset(const LLString & name);
-+ void loadPreset(const LLString & name,bool propagate=TRUE);
-
- /// save the parameter presets to file
- void savePreset(const LLString & name);
-diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
-index 9f23b37..0b63ecb 100644
---- a/indra/newview/llwlparammanager.cpp
-+++ b/indra/newview/llwlparammanager.cpp
-@@ -106,83 +106,65 @@ LLWLParamManager::~LLWLParamManager()
-
- void LLWLParamManager::loadPresets(const LLString& file_name)
- {
-- // if fileName exists, use legacy loading form the big file, otherwise, search the sky
-- // directory, and add the list
-- if(file_name != "")
-+ LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", ""));
-+ LL_INFOS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL;
-+
-+ bool found = true;
-+ while(found)
- {
-- LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", file_name));
-- LL_INFOS2("AppInit", "Shaders") << "Loading WindLight settings from " << path_name << LL_ENDL;
--
-- llifstream presetsXML(path_name.c_str());
--
-- if (presetsXML)
-+ std::string name;
-+ found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
-+ if(found)
- {
-- LLSD paramsData(LLSD::emptyMap());
-
-- LLPointer<LLSDParser> parser = new LLSDXMLParser();
-+ name=name.erase(name.length()-4);
-
-- parser->parse(presetsXML, paramsData, LLSDSerialize::SIZE_UNLIMITED);
-+ // bugfix for SL-46920: preventing filenames that break stuff.
-+ char * curl_str = curl_unescape(name.c_str(), name.size());
-+ std::string unescaped_name(curl_str);
-+ curl_free(curl_str);
-+ curl_str = NULL;
-
-- LLSD::map_const_iterator endParams = paramsData.endMap();
-- for(LLSD::map_const_iterator curParams = paramsData.beginMap();
-- curParams != endParams;
-- ++curParams)
-- {
-- addParamSet(curParams->first, curParams->second);
-- }
-+ LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
-+ loadPreset(unescaped_name,FALSE);
- }
- }
--
-- // otherwise, search the sky directory and find things there
-- else
-+
-+ // And repeat for user presets, note the user presets will modify any system presets already loaded
-+
-+ LLString path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", ""));
-+ LL_INFOS2("AppInit", "Shaders") << "Loading User WindLight settings from " << path_name2 << LL_ENDL;
-+
-+ found = true;
-+ while(found)
- {
-- LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", ""));
-- LL_INFOS2("AppInit", "Shaders") << "Loading WindLight settings from " << path_name << LL_ENDL;
--
-- //mParamList.clear();
--
-- bool found = true;
-- while(found)
-+ std::string name;
-+ found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name, false);
-+ if(found)
- {
-- std::string name;
-- found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
-+ name=name.erase(name.length()-4);
-+
-+ // bugfix for SL-46920: preventing filenames that break stuff.
-+ char * curl_str = curl_unescape(name.c_str(), name.size());
-+ std::string unescaped_name(curl_str);
-+ curl_free(curl_str);
-+ curl_str = NULL;
-
- LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
--
-- // if we have one
-- if(found)
-- {
-- // bugfix for SL-46920: preventing filenames that break stuff.
-- char * curl_str = curl_unescape(name.c_str(), name.size());
-- std::string unescaped_name(curl_str);
-- curl_free(curl_str);
-- curl_str = NULL;
--
-- // not much error checking here since we're getting rid of this
-- std::string sky_name = unescaped_name.substr(0, unescaped_name.size() - 4);
--
-- LLString cur_path(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", name));
-- LL_DEBUGS2("AppInit", "Shaders") << "Loading sky from " << cur_path << LL_ENDL;
--
-- std::ifstream sky_xml(cur_path.c_str());
-- if (sky_xml)
-- {
-- LLSD sky_data(LLSD::emptyMap());
-- LLPointer<LLSDParser> parser = new LLSDXMLParser();
-- parser->parse(sky_xml, sky_data, LLSDSerialize::SIZE_UNLIMITED);
--
-- addParamSet(sky_name, sky_data);
-- }
-- }
-+ loadPreset(unescaped_name,FALSE);
- }
- }
-+
- }
-
- void LLWLParamManager::savePresets(const LLString & fileName)
- {
-+ //Nobody currently calls me, but if they did, then its reasonable to write the data out to the user's folder
-+ //and not over the RO system wide version.
-+
- LLSD paramsData(LLSD::emptyMap());
-
-- LLString pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", fileName));
-+ LLString pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", fileName));
-
- for(std::map<std::string, LLWLParamSet>::iterator mIt = mParamList.begin();
- mIt != mParamList.end();
-@@ -200,8 +182,9 @@ void LLWLParamManager::savePresets(const LLString & fileName)
- presetsXML.close();
- }
-
--void LLWLParamManager::loadPreset(const LLString & name)
-+void LLWLParamManager::loadPreset(const LLString & name,bool propagate)
- {
-+
- // bugfix for SL-46920: preventing filenames that break stuff.
- char * curl_str = curl_escape(name.c_str(), name.size());
- std::string escaped_filename(curl_str);
-@@ -213,7 +196,16 @@ void LLWLParamManager::loadPreset(const LLString & name)
- std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", escaped_filename));
- llinfos << "Loading WindLight sky setting from " << pathName << llendl;
-
-- std::ifstream presetsXML(pathName.c_str());
-+ std::ifstream presetsXML;
-+ presetsXML.open(pathName.c_str());
-+
-+ // That failed, try loading from the users area instead.
-+ if(!presetsXML)
-+ {
-+ pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename);
-+ llinfos << "Loading User WindLight sky setting from " << pathName << llendl;
-+ presetsXML.open(pathName.c_str());
-+ }
-
- if (presetsXML)
- {
-@@ -239,10 +231,13 @@ void LLWLParamManager::loadPreset(const LLString & name)
- return;
- }
-
-- getParamSet(name, mCurParams);
--
-- propagateParameters();
--}
-+
-+ if(propagate)
-+ {
-+ getParamSet(name, mCurParams);
-+ propagateParameters();
-+ }
-+}
-
- void LLWLParamManager::savePreset(const LLString & name)
- {
-@@ -256,7 +251,7 @@ void LLWLParamManager::savePreset(const LLString & name)
-
- // make an empty llsd
- LLSD paramsData(LLSD::emptyMap());
-- std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", escaped_filename));
-+ std::string pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename));
-
- // fill it with LLSD windlight params
- paramsData = mParamList[name].getAll();
-@@ -531,7 +526,7 @@ bool LLWLParamManager::removeParamSet(const std::string& name, bool delete_from_
-
- if(delete_from_disk)
- {
-- LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", ""));
-+ LLString path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", ""));
-
- // use full curl escaped name
- char * curl_str = curl_escape(name.c_str(), name.size());
-diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h
-index 72b888d..aaac355 100644
---- a/indra/newview/llwlparammanager.h
-+++ b/indra/newview/llwlparammanager.h
-@@ -135,7 +135,7 @@ public:
- void savePresets(const LLString & fileName);
-
- /// load an individual preset into the sky
-- void loadPreset(const LLString & name);
-+ void loadPreset(const LLString & name,bool propogate=TRUE);
-
- /// save the parameter presets to file
- void savePreset(const LLString & name);
-@@ -195,7 +195,6 @@ public:
- // singleton pattern implementation
- static LLWLParamManager * instance();
-
--
- public:
-
- // helper variables
diff --git a/debian/patches/VWR-5082_set_bulk_inv_permissions.dpatch b/debian/patches/VWR-5082_set_bulk_inv_permissions.dpatch
deleted file mode 100644
index d69a75b..0000000
--- a/debian/patches/VWR-5082_set_bulk_inv_permissions.dpatch
+++ /dev/null
@@ -1,885 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Set bulk permissions patch.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: a system to set multiple inventory permissions
-
- at DPATCH@
-
-diff --git a/doc/contributions.txt b/doc/contributions.txt
-index 12bf2b7..866aaaf 100644
---- a/doc/contributions.txt
-+++ b/doc/contributions.txt
-@@ -199,6 +199,7 @@ Michelle2 Zenovka
- VWR-2652
- VWR-2834
- VWR-3749
-+ VWR-5082
- Mm Alder
- VWR-3777
- VWR-4794
-diff --git a/indra/newview/files.lst b/indra/newview/files.lst
-index 15062ae..13f7aff 100644
---- a/indra/newview/files.lst
-+++ b/indra/newview/files.lst
-@@ -370,3 +370,4 @@ newview/llworldmapview.cpp
- newview/llxmlrpctransaction.cpp
- newview/noise.cpp
- newview/pipeline.cpp
-+newview/llfloaterbulkpermission.cpp
-diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
-index 3e99384..1ec71ac 100644
---- a/indra/newview/llviewermenu.cpp
-+++ b/indra/newview/llviewermenu.cpp
-@@ -86,6 +86,7 @@
- #include "llfloateravatarinfo.h"
- #include "llfloateravatartextures.h"
- #include "llfloaterbuildoptions.h"
-+#include "llfloaterbulkpermission.h"
- #include "llfloaterbump.h"
- #include "llfloaterbuy.h"
- #include "llfloaterbuycontents.h"
-@@ -6239,6 +6240,17 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, cons
- }
- }
-
-+class LLToolsSetBulkPerms : public view_listener_t
-+{
-+ bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-+ {
-+ LLFloaterBulkPermission* queue = NULL;
-+ queue = LLFloaterBulkPermission::create();
-+ return true;
-+ }
-+};
-+
-+
- class LLToolsSelectedScriptAction : public view_listener_t
- {
- bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
-@@ -7827,6 +7839,7 @@ void initialize_menus()
- addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory");
- addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory");
- addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction");
-+ addMenu(new LLToolsSetBulkPerms(), "Tools.SetBulkPerms");
-
- addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie");
- addMenu(new LLToolsEnableLink(), "Tools.EnableLink");
-diff --git a/indra/newview/skins/xui/en-us/menu_viewer.xml b/indra/newview/skins/default/xui/en-us/menu_viewer.xml
-index 054f867..eacd0ed 100644
---- a/indra/newview/skins/default/xui/en-us/menu_viewer.xml
-+++ b/indra/newview/skins/default/xui/en-us/menu_viewer.xml
-@@ -756,6 +756,11 @@
- <on_click function="Tools.SelectedScriptAction" userdata="stop" />
- <on_enable function="EditableSelected" />
- </menu_item_call>
-+ <menu_item_call bottom="-468" enabled="false" height="19" label="Set permissions on selected task inventory"
-+ left="0" mouse_opaque="true" name="Set permissions on selected task inventory" width="250">
-+ <on_click function="Tools.SetBulkPerms" userdata="" />
-+ <on_enable function="EditableSelected" />
-+ </menu_item_call>
- </menu>
- <menu bottom="219" create_jump_keys="true" drop_shadow="true" enabled="true"
- height="317" label="Help" left="227" mouse_opaque="false" name="Help"
-
---- /dev/null 2008-07-08 17:15:34.716012103 +0100
-+++ slviewer/indra/newview/llfloaterbulkpermission.cpp 2008-07-08 18:57:37.000000000 +0100
-@@ -0,0 +1,534 @@
-+/**
-+ * @file llfloaterbulkpermissions.cpp
-+ * @brief A floater which allows task inventory item's properties to be changed on mass.
-+ *
-+ * $LicenseInfo:firstyear=2008&license=viewergpl$
-+ *
-+ * Copyright (c) 2008, Linden Research, Inc.
-+ *
-+ * Second Life Viewer Source Code
-+ * The source code in this file ("Source Code") is provided by Linden Lab
-+ * to you under the terms of the GNU General Public License, version 2.0
-+ * ("GPL"), unless you have obtained a separate licensing agreement
-+ * ("Other License"), formally executed by you and Linden Lab. Terms of
-+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
-+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
-+ *
-+ * There are special exceptions to the terms and conditions of the GPL as
-+ * it is applied to this Source Code. View the full text of the exception
-+ * in the file doc/FLOSS-exception.txt in this software distribution, or
-+ * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
-+ *
-+ * By copying, modifying or distributing this software, you acknowledge
-+ * that you have read and understood your obligations described above,
-+ * and agree to abide by those obligations.
-+ *
-+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
-+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
-+ * COMPLETENESS OR PERFORMANCE.
-+ * $/LicenseInfo$
-+ */
-+
-+/* Allow multiple task inventory properties to be set in one go, by Michelle2 Zenovka */
-+
-+/* TODO
-+
-+ * Add in the option to select objects or task inventory
-+ * Add in processing for objects
-+ * Add object recursion
-+
-+It would be nice to set the permissions on groups of prims as well as task inventory
-+
-+*/
-+
-+
-+#include "llviewerprecompiledheaders.h"
-+#include "llfloaterbulkpermission.h"
-+#include "llagent.h"
-+#include "llchat.h"
-+#include "llviewerwindow.h"
-+#include "llviewerobject.h"
-+#include "llviewerobjectlist.h"
-+#include "llviewerregion.h"
-+#include "lscript_rt_interface.h"
-+#include "llviewercontrol.h"
-+#include "llviewerobject.h"
-+#include "llviewerregion.h"
-+#include "llresmgr.h"
-+#include "llbutton.h"
-+#include "lldir.h"
-+#include "llfloaterchat.h"
-+#include "llviewerstats.h"
-+#include "lluictrlfactory.h"
-+#include "llselectmgr.h"
-+
-+const char* BULKPERM_QUEUE_TITLE = "Update Progress";
-+const char* BULKPERM_START_STRING = "update";
-+
-+namespace
-+{
-+ struct BulkQueueObjects : public LLSelectedObjectFunctor
-+ {
-+ BOOL scripted;
-+ BOOL modifiable;
-+ LLFloaterBulkPermission* mQueue;
-+ BulkQueueObjects(LLFloaterBulkPermission* q) : mQueue(q), scripted(FALSE), modifiable(FALSE) {}
-+ virtual bool apply(LLViewerObject* obj)
-+ {
-+ scripted = obj->flagScripted();
-+ modifiable = obj->permModify();
-+
-+ if( scripted && modifiable )
-+ {
-+ mQueue->addObject(obj->getID());
-+ return false;
-+ }
-+ else
-+ {
-+ return true; // fail: stop applying
-+ }
-+ }
-+ };
-+}
-+
-+///----------------------------------------------------------------------------
-+/// Class LLFloaterBulkPermission
-+///----------------------------------------------------------------------------
-+
-+// static
-+LLMap<LLUUID, LLFloaterBulkPermission*> LLFloaterBulkPermission::sInstances;
-+
-+
-+// Default constructor
-+LLFloaterBulkPermission::LLFloaterBulkPermission(const std::string& name,
-+ const LLRect& rect,
-+ const char* title,
-+ const char* start_string) :
-+ LLFloater(name, rect, title,
-+ RESIZE_YES, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT,
-+ DRAG_ON_TOP, MINIMIZE_YES, CLOSE_YES)
-+{
-+
-+ req_perm_mask=0; // This should match the default state the checkboxes are set to
-+
-+ LLUICtrlFactory::getInstance()->buildFloater(this,"floater_bulk_perms.xml");
-+
-+ childSetAction("Apply...",onApplyBtn,this);
-+ childSetEnabled("Apply...",TRUE);
-+
-+ childSetCommitCallback("Modify",&onCommitPermissions, this);
-+ childSetCommitCallback("Trans",&onCommitPermissions, this);
-+ childSetCommitCallback("Copy",&onCommitPermissions, this);
-+
-+ childSetCommitCallback("scripts",&InvSelection, this);
-+ childSetCommitCallback("textures",&InvSelection, this);
-+ childSetCommitCallback("sounds",&InvSelection, this);
-+ childSetCommitCallback("animations",&InvSelection, this);
-+ childSetCommitCallback("notecards",&InvSelection, this);
-+ childSetCommitCallback("landmarks",&InvSelection, this);
-+ childSetCommitCallback("bodyparts",&InvSelection, this);
-+ childSetCommitCallback("clothing",&InvSelection, this);
-+ childSetCommitCallback("gestures",&InvSelection, this);
-+
-+ setTitle(title);
-+
-+ if (!getHost())
-+ {
-+ LLRect curRect = getRect();
-+ translate(rect.mLeft - curRect.mLeft, rect.mTop - curRect.mTop);
-+ }
-+
-+ mStartString = start_string;
-+ mDone = FALSE;
-+ sInstances.addData(mID, this);
-+
-+}
-+
-+void LLFloaterBulkPermission::doApply()
-+{
-+ // Its alive now do the nasty work that the ScriptQueue and friends try to do in the menu code
-+ // but first grab the user options
-+
-+ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
-+ list->deleteAllItems();
-+
-+ LLFloaterBulkPermission* q;
-+ q=(LLFloaterBulkPermission*)this;
-+
-+ BulkQueueObjects func(q);
-+ const bool firstonly = false;
-+ bool fail = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&func, firstonly);
-+ if(fail)
-+ {
-+ if ( !func.modifiable )
-+ {
-+ gViewerWindow->alertXml("NO MODIFY");
-+ }
-+ else
-+ {
-+ llerrs << "Bad logic." << llendl;
-+ }
-+ }
-+ else
-+ {
-+ if (!q->start())
-+ {
-+ llwarns << "Unexpected script compile failure." << llendl;
-+ }
-+ }
-+}
-+
-+// Destroys the object
-+LLFloaterBulkPermission::~LLFloaterBulkPermission()
-+{
-+ sInstances.removeData(mID);
-+}
-+
-+// find an instance by ID. Return NULL if it does not exist.
-+// static
-+LLFloaterBulkPermission* LLFloaterBulkPermission::findInstance(const LLUUID& id)
-+{
-+ if(sInstances.checkData(id))
-+ {
-+ return sInstances.getData(id);
-+ }
-+ return NULL;
-+}
-+
-+
-+// This is the callback method for the viewer object currently being
-+// worked on.
-+// NOT static, virtual!
-+void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
-+ InventoryObjectList* inv,
-+ S32,
-+ void* q_id)
-+{
-+ llinfos << "LLFloaterBulkPermission::inventoryChanged() for object "
-+ << viewer_object->getID() << llendl;
-+
-+ //Remove this listener from the object since its
-+ //listener callback is now being executed.
-+
-+ //We remove the listener here because the function
-+ //removeVOInventoryListener removes the listener from a ViewerObject
-+ //which it internally stores.
-+
-+ //If we call this further down in the function, calls to handleInventory
-+ //and nextObject may update the interally stored viewer object causing
-+ //the removal of the incorrect listener from an incorrect object.
-+
-+ //Fixes SL-6119:Recompile scripts fails to complete
-+ removeVOInventoryListener();
-+
-+ if (viewer_object && inv && (viewer_object->getID() == mCurrentObjectID) )
-+ {
-+ handleInventory(viewer_object, inv);
-+ }
-+ else
-+ {
-+ // something went wrong...
-+ // note that we're not working on this one, and move onto the
-+ // next object in the list.
-+ llwarns << "No inventory for " << mCurrentObjectID
-+ << llendl;
-+ nextObject();
-+ }
-+}
-+
-+void LLFloaterBulkPermission::onApplyBtn(void* user_data)
-+{
-+ LLFloaterBulkPermission* self = (LLFloaterBulkPermission*)user_data;
-+ self->doApply();
-+}
-+
-+
-+// static
-+void LLFloaterBulkPermission::InvSelection(LLUICtrl* ctrl, void* data)
-+{
-+ LLFloaterBulkPermission* self = (LLFloaterBulkPermission*)data;
-+
-+ self->processObject=self->getChild<LLCheckBoxCtrl>("objects")->get();
-+ self->processScript=self->getChild<LLCheckBoxCtrl>("scripts")->get();
-+ self->processTexture=self->getChild<LLCheckBoxCtrl>("textures")->get();
-+ self->processSound=self->getChild<LLCheckBoxCtrl>("sounds")->get();
-+ self->processAnimation=self->getChild<LLCheckBoxCtrl>("animations")->get();
-+ self->processNotecard=self->getChild<LLCheckBoxCtrl>("notecards")->get();
-+ self->processGesture=self->getChild<LLCheckBoxCtrl>("gestures")->get();
-+ self->processClothing=self->getChild<LLCheckBoxCtrl>("clothing")->get();
-+ self->processBodypart=self->getChild<LLCheckBoxCtrl>("bodyparts")->get();
-+ self->processLandmark=self->getChild<LLCheckBoxCtrl>("landmarks")->get();
-+
-+
-+}
-+
-+// static
-+void LLFloaterBulkPermission::onCommitPermissions(LLUICtrl* ctrl, void* data)
-+{
-+ LLFloaterBulkPermission* self = (LLFloaterBulkPermission*)data;
-+ LLCheckBoxCtrl* CheckModify = self->getChild<LLCheckBoxCtrl>("Modify");
-+ LLCheckBoxCtrl* CheckCopy = self->getChild<LLCheckBoxCtrl>("Copy");
-+ LLCheckBoxCtrl* CheckTrans = self->getChild<LLCheckBoxCtrl>("Trans");
-+
-+ self->req_perm_mask=0;
-+
-+ if(CheckModify->get())
-+ {
-+ self->req_perm_mask|=PERM_MODIFY;
-+ }
-+ else
-+ {
-+ self->req_perm_mask&=~PERM_MODIFY;
-+ }
-+
-+ if(CheckCopy->get())
-+ {
-+ self->req_perm_mask|=PERM_COPY;
-+ }
-+ else
-+ {
-+ self->req_perm_mask&=~PERM_COPY;
-+ }
-+
-+ if(CheckTrans->get())
-+ {
-+ self->req_perm_mask|=PERM_TRANSFER;
-+ }
-+ else
-+ {
-+ self->req_perm_mask&=~PERM_TRANSFER;
-+ }
-+
-+
-+}
-+
-+void LLFloaterBulkPermission::addObject(const LLUUID& id)
-+{
-+ mObjectIDs.put(id);
-+}
-+
-+BOOL LLFloaterBulkPermission::start()
-+{
-+ llinfos << "LLFloaterBulkPermission::start()" << llendl;
-+ char buffer[MAX_STRING]; /*Flawfinder: ignore*/
-+ snprintf(buffer, sizeof(buffer), "Starting %s of %d items.", mStartString, mObjectIDs.count()); /* Flawfinder: ignore */
-+
-+ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
-+ list->addCommentText(buffer);
-+
-+ return nextObject();
-+}
-+
-+BOOL LLFloaterBulkPermission::isDone() const
-+{
-+ return (mCurrentObjectID.isNull() || (mObjectIDs.count() == 0));
-+}
-+
-+// go to the next object. If no objects left, it falls out silently
-+// and waits to be killed by the window being closed.
-+BOOL LLFloaterBulkPermission::nextObject()
-+{
-+ S32 count;
-+ BOOL successful_start = FALSE;
-+ do
-+ {
-+ count = mObjectIDs.count();
-+ llinfos << "LLFloaterBulkPermission::nextObject() - " << count
-+ << " objects left to process." << llendl;
-+ mCurrentObjectID.setNull();
-+ if(count > 0)
-+ {
-+ successful_start = popNext();
-+ }
-+ llinfos << "LLFloaterBulkPermission::nextObject() "
-+ << (successful_start ? "successful" : "unsuccessful")
-+ << llendl;
-+ } while((mObjectIDs.count() > 0) && !successful_start);
-+
-+ if(isDone() && !mDone)
-+ {
-+
-+ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
-+
-+ mDone = TRUE;
-+ char buffer[MAX_STRING]; /*Flawfinder: ignore*/
-+ snprintf(buffer, sizeof(buffer), "Done."); /* Flawfinder: ignore */
-+ list->addCommentText(buffer);
-+
-+ }
-+ return successful_start;
-+}
-+
-+// returns true if the queue has started, otherwise false. This
-+// method pops the top object off of the queue.
-+BOOL LLFloaterBulkPermission::popNext()
-+{
-+ // get the first element off of the container, and attempt to get
-+ // the inventory.
-+ BOOL rv = FALSE;
-+ S32 count = mObjectIDs.count();
-+ if(mCurrentObjectID.isNull() && (count > 0))
-+ {
-+ mCurrentObjectID = mObjectIDs.get(0);
-+ llinfos << "LLFloaterBulkPermission::popNext() - mCurrentID: "
-+ << mCurrentObjectID << llendl;
-+ mObjectIDs.remove(0);
-+ LLViewerObject* obj = gObjectList.findObject(mCurrentObjectID);
-+ if(obj)
-+ {
-+ llinfos << "LLFloaterBulkPermission::popNext() requesting inv for "
-+ << mCurrentObjectID << llendl;
-+ LLUUID* id = new LLUUID(mID);
-+ registerVOInventoryListener(obj,id);
-+ requestVOInventory();
-+ rv = TRUE;
-+ }
-+ else
-+ {
-+ llinfos<<"LLFloaterBulkPermission::popNext() returned a NULL LLViewerObject" <<llendl;
-+ }
-+ }
-+
-+ return rv;
-+}
-+
-+
-+// static
-+LLFloaterBulkPermission* LLFloaterBulkPermission::create()
-+{
-+ S32 left, top;
-+ gFloaterView->getNewFloaterPosition(&left, &top);
-+ LLRect rect = gSavedSettings.getRect("CompileOutputRect");
-+ rect.translate(left - rect.mLeft, top - rect.mTop);
-+ LLFloaterBulkPermission* new_queue = new LLFloaterBulkPermission("queue",rect,"Setting Bulk permissions","Results");
-+ new_queue->open(); /*Flawfinder: ignore*/
-+ return new_queue;
-+}
-+
-+
-+void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, InventoryObjectList* inv)
-+{
-+ // find all of the lsl, leaving off duplicates. We'll remove
-+ // all matching asset uuids on compilation success.
-+
-+ llinfos<<"handleInventory"<<llendl;
-+
-+ char buffer[MAX_STRING]; /*Flawfinder: ignore*/
-+ LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
-+
-+ InventoryObjectList::const_iterator it = inv->begin();
-+ InventoryObjectList::const_iterator end = inv->end();
-+ for ( ; it != end; ++it)
-+ {
-+ llinfos<<"Doing iterator of inventory"<<llendl;
-+
-+ if( ( (*it)->getType() == LLAssetType::AT_LSL_TEXT && processScript) ||
-+ ( (*it)->getType() == LLAssetType::AT_TEXTURE && processTexture) ||
-+ ( (*it)->getType() == LLAssetType::AT_SOUND && processSound) ||
-+ ( (*it)->getType() == LLAssetType::AT_LANDMARK && processLandmark) ||
-+ ( (*it)->getType() == LLAssetType::AT_CLOTHING && processClothing) ||
-+ ( (*it)->getType() == LLAssetType::AT_OBJECT && processObject) ||
-+ ( (*it)->getType() == LLAssetType::AT_NOTECARD && processNotecard) ||
-+ ( (*it)->getType() == LLAssetType::AT_BODYPART && processBodypart) ||
-+ ( (*it)->getType() == LLAssetType::AT_ANIMATION && processAnimation) ||
-+ ( (*it)->getType() == LLAssetType::AT_GESTURE && processGesture))
-+ {
-+
-+ LLViewerObject* object = gObjectList.findObject(viewer_obj->getID());
-+
-+ if (object)
-+ {
-+ LLInventoryItem* item = (LLInventoryItem*)((LLInventoryObject*)(*it));
-+ LLViewerInventoryItem* new_item = (LLViewerInventoryItem*)item;
-+ LLPermissions perm(new_item->getPermissions());
-+
-+ // chomp the inventory name so it fits in the scroll window nicely
-+ // and the user can see the [OK]
-+ std::string invname;
-+ invname=item->getName().substr(0,item->getName().size() < 30 ? item->getName().size() : 30 );
-+
-+ // My attempt at checking valid permissions, CHECK ME
-+ // note its not actually bad to try to set permissions that are not allowed as the
-+ // server will protect against this, but it will piss the user off if its wrong
-+ if(
-+ (perm.getCreator()==gAgentID) ||
-+ (perm.getMaskOwner() & PERM_TRANSFER) && (perm.getMaskOwner() & PERM_MODIFY) ||
-+ (gAgent.getGroupID()==perm.getGroup() && (perm.getMaskGroup() & PERM_TRANSFER) && (perm.getMaskGroup() & PERM_MODIFY))
-+ ){
-+ llinfos<<"Setting perms"<<llendl;
-+ perm.setMaskNext(req_perm_mask);
-+ new_item->setPermissions(perm);
-+ updateInventory(object,new_item,TASK_INVENTORY_ITEM_KEY,FALSE);
-+ snprintf(buffer, sizeof(buffer), "Setting perms on '%s' [OK]", invname.c_str()); /* Flawfinder: ignore */
-+ }
-+ else
-+ {
-+ llinfos<<"NOT setting perms"<<llendl;
-+ snprintf(buffer, sizeof(buffer), "Setting perms on '%s' [FAILED]", invname.c_str()); /* Flawfinder: ignore */
-+
-+ }
-+
-+ list->addCommentText(buffer);
-+
-+ //TODO if we are an object inside an object we should check a recuse flag and if set
-+ //open the inventory of the object and recurse
-+
-+ // if(recurse && ( (*it)->getType() == LLAssetType::AT_OBJECT && processObject))
-+ // {
-+ // I think we need to get the UUID of the object inside the inventory
-+ // call item->fetchFromServer();
-+ // we need a call back to say item has arrived *sigh*
-+ // we then need to do something like
-+ // LLUUID* id = new LLUUID(mID);
-+ // registerVOInventoryListener(obj,id);
-+ // requestVOInventory();
-+ // }
-+
-+ }
-+ }
-+ }
-+
-+ nextObject();
-+}
-+
-+
-+// Avoid inventory callbacks etc by just fire and forgetting the message with the permissions update
-+// we could do this via LLViewerObject::updateInventory but that uses inventory call backs and buggers
-+// us up and we would have a dodgy item iterator
-+
-+void LLFloaterBulkPermission::updateInventory(
-+ LLViewerObject* object,
-+ LLViewerInventoryItem* item,
-+ U8 key,
-+ bool is_new)
-+{
-+ LLMemType mt(LLMemType::MTYPE_OBJECT);
-+
-+ // This slices the object into what we're concerned about on the
-+ // viewer. The simulator will take the permissions and transfer
-+ // ownership.
-+ LLPointer<LLViewerInventoryItem> task_item =
-+ new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(),
-+ item->getAssetUUID(), item->getType(),
-+ item->getInventoryType(),
-+ item->getName(), item->getDescription(),
-+ item->getSaleInfo(),
-+ item->getFlags(),
-+ item->getCreationDate());
-+ task_item->setTransactionID(item->getTransactionID());
-+ LLMessageSystem* msg = gMessageSystem;
-+ msg->newMessageFast(_PREHASH_UpdateTaskInventory);
-+ msg->nextBlockFast(_PREHASH_AgentData);
-+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
-+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
-+ msg->nextBlockFast(_PREHASH_UpdateData);
-+ msg->addU32Fast(_PREHASH_LocalID, object->mLocalID);
-+ msg->addU8Fast(_PREHASH_Key, key);
-+ msg->nextBlockFast(_PREHASH_InventoryData);
-+ task_item->packMessage(msg);
-+ msg->sendReliable(object->getRegion()->getHost());
-+
-+}
-+
-+
-+
---- /dev/null 2008-07-08 17:15:34.716012103 +0100
-+++ slviewer/indra/newview/llfloaterbulkpermission.h 2008-07-08 18:37:53.000000000 +0100
-@@ -0,0 +1,138 @@
-+/**
-+ * @file llfloaterbulkpermissions.h
-+ * @brief A floater which allows task inventory item's properties to be changed on mass.
-+ *
-+ * $LicenseInfo:firstyear=2008&license=viewergpl$
-+ *
-+ * Copyright (c) 2008, Linden Research, Inc.
-+ *
-+ * Second Life Viewer Source Code
-+ * The source code in this file ("Source Code") is provided by Linden Lab
-+ * to you under the terms of the GNU General Public License, version 2.0
-+ * ("GPL"), unless you have obtained a separate licensing agreement
-+ * ("Other License"), formally executed by you and Linden Lab. Terms of
-+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
-+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
-+ *
-+ * There are special exceptions to the terms and conditions of the GPL as
-+ * it is applied to this Source Code. View the full text of the exception
-+ * in the file doc/FLOSS-exception.txt in this software distribution, or
-+ * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
-+ *
-+ * By copying, modifying or distributing this software, you acknowledge
-+ * that you have read and understood your obligations described above,
-+ * and agree to abide by those obligations.
-+ *
-+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
-+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
-+ * COMPLETENESS OR PERFORMANCE.
-+ * $/LicenseInfo$
-+ */
-+
-+/* Allow multiple task inventory properties to be set in one go, by Michelle2 Zenovka */
-+
-+#ifndef LL_LLBULKPERMISSION_H
-+#define LL_LLBULKPERMISSION_H
-+
-+#include "lldarray.h"
-+#include "llinventory.h"
-+#include "llviewerobject.h"
-+#include "llvoinventorylistener.h"
-+#include "llmap.h"
-+#include "lluuid.h"
-+
-+#include "llfloater.h"
-+#include "llscrolllistctrl.h"
-+
-+#include "llviewerinventory.h"
-+
-+class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener
-+{
-+public:
-+ // addObject() accepts an object id.
-+ void addObject(const LLUUID& id);
-+
-+ // start() returns TRUE if the queue has started, otherwise FALSE.
-+ BOOL start();
-+
-+ // Use this method to create a reset queue. Once created, it
-+ // will be responsible for it's own destruction.
-+ static LLFloaterBulkPermission * create();
-+
-+protected:
-+ LLFloaterBulkPermission(const std::string& name, const LLRect& rect,
-+ const char* title, const char* start_string);
-+ virtual ~LLFloaterBulkPermission();
-+
-+ // This is the callback method for the viewer object currently
-+ // being worked on.
-+ /*virtual*/ void inventoryChanged(LLViewerObject* obj,
-+ InventoryObjectList* inv,
-+ S32 serial_num,
-+ void* queue);
-+
-+ // This is called by inventoryChanged
-+ void handleInventory(LLViewerObject* viewer_obj,
-+ InventoryObjectList* inv);
-+
-+
-+ void updateInventory(LLViewerObject* object,
-+ LLViewerInventoryItem* item,
-+ U8 key,
-+ bool is_new);
-+
-+
-+ static void onCloseBtn(void* user_data);
-+ static void onApplyBtn(void* user_data);
-+ static void onCommitPermissions(LLUICtrl* ctrl, void* data);
-+ static void InvSelection(LLUICtrl* ctrl, void* data);
-+
-+ // returns true if this is done
-+ BOOL isDone() const;
-+
-+ //Read the settings and Apply the permissions
-+ void doApply();
-+
-+ // go to the next object. If no objects left, it falls out
-+ // silently and waits to be killed by the deleteIfDone() callback.
-+ BOOL nextObject();
-+ BOOL popNext();
-+
-+ // Get this instances ID.
-+ const LLUUID& getID() const { return mID; }
-+
-+ // find an instance by ID. Return NULL if it does not exist.
-+ static LLFloaterBulkPermission* findInstance(const LLUUID& id);
-+
-+ U32 req_perm_mask;
-+
-+ BOOL processObject;
-+ BOOL processScript;
-+ BOOL processTexture;
-+ BOOL processSound;
-+ BOOL processAnimation;
-+ BOOL processCallingcard;
-+ BOOL processNotecard;
-+ BOOL processGesture;
-+ BOOL processClothing;
-+ BOOL processBodypart;
-+ BOOL processLandmark;
-+
-+protected:
-+ // UI
-+ LLScrollListCtrl* mMessages;
-+ LLButton* mCloseBtn;
-+
-+ // Object Queue
-+ LLDynamicArray<LLUUID> mObjectIDs;
-+ LLUUID mCurrentObjectID;
-+ BOOL mDone;
-+
-+ LLUUID mID;
-+ static LLMap<LLUUID, LLFloaterBulkPermission*> sInstances;
-+
-+ const char* mStartString;
-+
-+};
-+
-+#endif
---- /dev/null 2008-07-08 17:15:34.716012103 +0100
-+++ slviewer/indra/newview/skins/default/xui/en-us/floater_bulk_perms.xml 2008-07-08 18:58:20.000000000 +0100
-@@ -0,0 +1,120 @@
-+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-+<floater bottom="-554" can_close="true" can_drag_on_left="false" can_minimize="true"
-+ can_resize="false" can_tear_off="false" enabled="true" height="420"
-+ left="367" min_height="1000" min_width="460" mouse_opaque="true"
-+ name="floaterrecursiveperms" title="Bulk permission settings"
-+ width="460">
-+
-+<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
-+ bottom="-40" drop_shadow_visible="true" enabled="true" follows="left|top"
-+ font="SansSerifSmall" h_pad="0" halign="left" height="10" left="10"
-+ mouse_opaque="true" name="applyto" v_pad="0" width="206">Apply to</text>
-+
-+<check_box bottom="-70" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Scripts" left="10" mouse_opaque="true"
-+ name="scripts" radio_style="false"
-+ tool_tip="Apply bulk permissions to scripts"
-+ width="219"/>
-+
-+<check_box bottom="-90" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Textures" left="10" mouse_opaque="true"
-+ name="textures" radio_style="false"
-+ tool_tip="Apply bulk permissions to textures"
-+ width="219"/>
-+
-+<check_box bottom="-110" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Animations" left="10" mouse_opaque="true"
-+ name="animations" radio_style="false"
-+ tool_tip="Apply bulk permissions to animations"
-+ width="219"/>
-+
-+<check_box bottom="-130" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Sounds" left="10" mouse_opaque="true"
-+ name="sounds" radio_style="false"
-+ tool_tip="Apply bulk permissions to sounds"
-+ width="219"/>
-+
-+<check_box bottom="-150" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Contained objects" left="10" mouse_opaque="true"
-+ name="objects" radio_style="false"
-+ tool_tip="Apply bulk permissions to objects inside inventory"
-+ width="219"/>
-+
-+<check_box bottom="-170" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Landmarks" left="10" mouse_opaque="true"
-+ name="landmarks" radio_style="false"
-+ tool_tip="Apply bulk permissions to landmarks"
-+ width="219"/>
-+
-+<check_box bottom="-190" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Notecards" left="10" mouse_opaque="true"
-+ name="notecards" radio_style="false"
-+ tool_tip="Apply bulk permissions to notecards"
-+ width="219"/>
-+
-+<check_box bottom="-210" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Gesture" left="10" mouse_opaque="true"
-+ name="gestures" radio_style="false"
-+ tool_tip="Apply bulk permissions to gestures"
-+ width="219"/>
-+
-+<check_box bottom="-230" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Clothing" left="10" mouse_opaque="true"
-+ name="clothing" radio_style="false"
-+ tool_tip="Apply bulk permissions to clothing"
-+ width="219"/>
-+
-+<check_box bottom="-250" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Bodypart" left="10" mouse_opaque="true"
-+ name="bodyparts" radio_style="false"
-+ tool_tip="Apply bulk permissions to bodyparts"
-+ width="219"/>
-+
-+<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
-+ bottom="-40" drop_shadow_visible="true" enabled="true" follows="left|top"
-+ font="SansSerifSmall" h_pad="0" halign="left" height="10" left="200"
-+ mouse_opaque="true" name="applyto" v_pad="0" width="206">Permissions</text>
-+
-+
-+<check_box bottom="-110" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Copy" left="200" mouse_opaque="true"
-+ name="Copy" radio_style="false"
-+ tool_tip="Next owner can copy"
-+ width="219"/>
-+
-+<check_box bottom="-130" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Modify" left="200" mouse_opaque="true"
-+ name="Modify" radio_style="false"
-+ tool_tip="Next owner can modify"
-+ width="219"/>
-+
-+<check_box bottom="-150" enabled="true" follows="left|top" font="SansSerifSmall"
-+ height="16" initial_value="false"
-+ label="Trans" left="200" mouse_opaque="true"
-+ name="Trans" radio_style="false"
-+ tool_tip="Next owner can transfer"
-+ width="219"/>
-+
-+<scroll_list background_visible="true" bottom="-410" column_padding="5" draw_border="true"
-+ draw_heading="false" draw_stripes="true" enabled="true"
-+ follows="left|top|right|bottom" height="140" left="10" mouse_opaque="true"
-+ multi_select="false" name="queue output" width="440" />
-+
-+<button bottom="-70" enabled="true" follows="left|top" font="SansSerif"
-+ halign="center" height="20" label="Apply..."
-+ label_selected="Apply..." left="295" mouse_opaque="true"
-+ name="Apply..." scale_image="true" width="145" />
-+
-+</floater>
diff --git a/debian/patches/VWR-5697_fix_startup_paths.dpatch b/debian/patches/VWR-5697_fix_startup_paths.dpatch
deleted file mode 100644
index 7772c94..0000000
--- a/debian/patches/VWR-5697_fix_startup_paths.dpatch
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## fix startup paths.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/llvfs/lldir_solaris.cpp
-===================================================================
---- ./indra/llvfs/lldir_solaris.cpp (revision 367)
-+++ ./indra/llvfs/lldir_solaris.cpp (working copy)
-@@ -91,7 +91,9 @@
- mAppRODataDir = strdup(tmp_str);
- mOSUserDir = getCurrentUserHome(tmp_str);
- mOSUserAppDir = "";
-- mLindenUserDir = tmp_str;
-+ // Init this to a sensible location it will be updated once we try to login but it could
-+ // be used as a write location before then.
-+ mLindenUserDir = mOSUserDir;
-
- char path [LL_MAX_PATH]; /* Flawfinder: ignore */
-
-Index: ./indra/llvfs/lldir_linux.cpp
-===================================================================
---- ./indra/llvfs/lldir_linux.cpp (revision 367)
-+++ ./indra/llvfs/lldir_linux.cpp (working copy)
-@@ -96,8 +96,11 @@
- mAppRODataDir = tmp_str;
- mOSUserDir = getCurrentUserHome(tmp_str);
- mOSUserAppDir = "";
-- mLindenUserDir = tmp_str;
-
-+ // Init this to a sensible location it will be updated once we try to login but it could
-+ // be used as a write location before then.
-+ mLindenUserDir = mOSUserDir;
-+
- char path [32]; /* Flawfinder: ignore */
-
- // *NOTE: /proc/%d/exe doesn't work on FreeBSD. But that's ok,
-Index: ./indra/llvfs/lldir_mac.cpp
-===================================================================
---- ./indra/llvfs/lldir_mac.cpp (revision 367)
-+++ ./indra/llvfs/lldir_mac.cpp (working copy)
-@@ -168,6 +168,10 @@
-
- // mOSUserAppDir
- mOSUserAppDir = mOSUserDir;
-+
-+ // Init this to a sensible location it will be updated once we try to login but it could
-+ // be used as a write location before then.
-+ mLindenUserDir = mOSUserDir;
-
- // mTempDir
- error = FSFindFolder(kOnAppropriateDisk, kTemporaryFolderType, true, &fileRef);
-Index: ./indra/llvfs/lldir_win32.cpp
-===================================================================
---- ./indra/llvfs/lldir_win32.cpp (revision 367)
-+++ ./indra/llvfs/lldir_win32.cpp (working copy)
-@@ -58,6 +58,10 @@
-
- mOSUserDir = utf16str_to_utf8str(llutf16string(w_str));
-
-+ // Init this to a sensible location it will be updated once we try to login but it could
-+ // be used as a write location before then.
-+ mLindenUserDir = mOSUserDir;
-+
- // Local Settings\Application Data is where cache files should
- // go, they don't get copied to the server if the user moves his
- // profile around on the network. JC
diff --git a/debian/patches/VWR-5917_multiple_user_day_cycles_in_rw_area.dpatch b/debian/patches/VWR-5917_multiple_user_day_cycles_in_rw_area.dpatch
deleted file mode 100644
index 9882c80..0000000
--- a/debian/patches/VWR-5917_multiple_user_day_cycles_in_rw_area.dpatch
+++ /dev/null
@@ -1,530 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Allow multiple user savable daycycles.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: VWR-5917 fix
-
- at DPATCH@
-
-diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp
-index f517439..154975e 100644
---- a/indra/newview/llfloaterdaycycle.cpp
-+++ b/indra/newview/llfloaterdaycycle.cpp
-@@ -65,6 +65,30 @@ const F32 LLFloaterDayCycle::sHoursPerDay = 24.0f;
- LLFloaterDayCycle::LLFloaterDayCycle() : LLFloater("Day Cycle Floater")
- {
- LLUICtrlFactory::getInstance()->buildFloater(this, "floater_day_cycle_options.xml");
-+
-+
-+ // This populates M2's combo with the names of avaiable day cycles.
-+
-+ // add the combo boxes
-+ LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
-+
-+ if(comboBox != NULL) {
-+
-+ std::map<std::string, std::string>::iterator mIt =
-+ LLWLParamManager::instance()->mDay.mDayList.begin();
-+ for(; mIt !=LLWLParamManager::instance()->mDay.mDayList.end(); mIt++)
-+ {
-+ comboBox->add(mIt->first);
-+ llinfos << "adding "<<mIt->first<<llendl;
-+ }
-+
-+ // entry for when we're in estate time
-+ //comboBox->add("");
-+
-+ // set defaults on combo boxes
-+ comboBox->selectByValue(LLSD("Default"));
-+ }
-+
-
- // add the combo boxes
- LLComboBox* keyCombo = getChild<LLComboBox>("WLKeyPresets");
-@@ -135,11 +159,20 @@ void LLFloaterDayCycle::initCallbacks(void)
- childSetAction("WLAnimSky", onRunAnimSky, NULL);
- childSetAction("WLStopAnimSky", onStopAnimSky, NULL);
-
-- childSetAction("WLLoadDayCycle", onLoadDayCycle, NULL);
-- childSetAction("WLSaveDayCycle", onSaveDayCycle, NULL);
--
- childSetAction("WLAddKey", onAddKey, NULL);
- childSetAction("WLDeleteKey", onDeleteKey, NULL);
-+
-+ // Load/save
-+ LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
-+
-+ childSetAction("WLLoadDayCycle", onLoadDayCycle, (void*)comboBox);
-+ childSetAction("WLSaveDayCycle", onSaveDayCycle, (void*)comboBox);
-+
-+ childSetAction("WLNewPreset", onNewPreset, (void*)this);
-+ childSetAction("WLDeletePreset", onDeletePreset, (void*)this);
-+
-+ comboBox->setCommitCallback(onChangePresetName);
-+
- }
-
- void LLFloaterDayCycle::syncMenu()
-@@ -323,9 +356,17 @@ void LLFloaterDayCycle::onUseLindenTime(void* userData)
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = true;
- }
-
--void LLFloaterDayCycle::onLoadDayCycle(void* userData)
-+void LLFloaterDayCycle::onLoadDayCycle(void * userData)
- {
-- LLWLParamManager::instance()->mDay.loadDayCycle("Default.xml");
-+
-+ LLComboBox * combo_box = static_cast<LLComboBox*>(userData);
-+
-+ if(combo_box->getSimple() == "")
-+ {
-+ return;
-+ }
-+
-+ LLWLParamManager::instance()->mDay.loadDayCycle(combo_box->getSelectedValue().asString());
-
- // sync it all up
- syncSliderTrack();
-@@ -343,9 +384,25 @@ void LLFloaterDayCycle::onLoadDayCycle(void* userData)
- LLWLParamManager::instance()->mCurParams);
- }
-
--void LLFloaterDayCycle::onSaveDayCycle(void* userData)
-+void LLFloaterDayCycle::onSaveDayCycle(void * userData)
- {
-- LLWLParamManager::instance()->mDay.saveDayCycle("Default.xml");
-+ LLComboBox * combo_box = static_cast<LLComboBox*>(userData);
-+
-+ if(combo_box->getSimple() == "")
-+ {
-+ return;
-+ }
-+
-+ std::string name(combo_box->getSelectedValue().asString());
-+
-+ if(name=="Default")
-+ {
-+ gViewerWindow->alertXml("WLNoEditDefault");
-+ return;
-+ }
-+
-+
-+ LLWLParamManager::instance()->mDay.saveDayCycle(name);
- }
-
-
-@@ -592,5 +649,108 @@ void LLFloaterDayCycle::onDeleteKey(void* userData)
- minSpin->set(min);
-
- syncTrack();
-+}
-+
-+void LLFloaterDayCycle::onChangePresetName(LLUICtrl* ctrl, void * userData)
-+{
-+
-+ LLComboBox * combo_box = static_cast<LLComboBox*>(ctrl);
-+
-+ if(combo_box->getSimple() == "")
-+ {
-+ return;
-+ }
-+
-+ // We probably should not do this here, day cycle should look after its own map lookups
-+// std::map<std::string,std::string>::iterator iter = LLWLParamManager::instance()->mDay.mDayList.find(combo_box->getSelectedValue().asString());
-+
-+ llinfos<<"New day cycle selected: "<<combo_box->getSelectedValue().asString()<<llendl;
-+
-+ onLoadDayCycle((void*)combo_box);
-
- }
-+
-+/// button to add a new day
-+void LLFloaterDayCycle::onNewPreset(void * userData)
-+{
-+ gViewerWindow->alertXmlEditText("NewSkyPreset", LLString::format_map_t(),
-+ NULL, NULL, newPromptCallback, userData);
-+}
-+
-+/// button to delete a day
-+void LLFloaterDayCycle::onDeletePreset(void * userData)
-+{
-+ LLFloaterDayCycle * pthis=(LLFloaterDayCycle *)userData;
-+
-+ LLComboBox* combo_box = pthis->getChild<LLComboBox>("WLPresetsCombo");
-+
-+ if(combo_box->getSelectedValue().asString() == "")
-+ {
-+ return;
-+ }
-+
-+ LLString::format_map_t args;
-+ args["[SKY]"] = combo_box->getSelectedValue().asString();
-+ gViewerWindow->alertXml("WLDeletePresetAlert", args, deleteAlertCallback, pthis);
-+
-+}
-+
-+void LLFloaterDayCycle::deleteAlertCallback(S32 option, void* userData)
-+{
-+ //Need to delete the current settings and then fallback to *something*
-+ // either next in list or may be just Default ???
-+
-+ if(option!=0)
-+ return;
-+
-+ LLFloaterDayCycle * pthis=(LLFloaterDayCycle *)userData;
-+
-+ LLComboBox* combo_box = pthis->getChild<LLComboBox>("WLPresetsCombo");
-+
-+ std::string name(combo_box->getSelectedValue().asString());
-+
-+ if(name=="Default")
-+ {
-+ gViewerWindow->alertXml("WLNoEditDefault");
-+ return;
-+ }
-+
-+ combo_box->remove(name);
-+
-+ LLWLParamManager::instance()->mDay.deleteDayCycle(name,TRUE);
-+
-+ combo_box->selectByValue("Default");
-+
-+ onLoadDayCycle(combo_box);
-+
-+}
-+
-+
-+void LLFloaterDayCycle::newPromptCallback(S32 option, const LLString& text, void* userData)
-+{
-+ // Save the curent settings as the new filename.
-+
-+ LLFloaterDayCycle * pthis=(LLFloaterDayCycle *)userData;
-+
-+ std::map<std::string, std::string>::iterator mIt = LLWLParamManager::instance()->mDay.mDayList.find(text);
-+ if(mIt != LLWLParamManager::instance()->mDay.mDayList.end())
-+ {
-+ //cannot add name already in use
-+ gViewerWindow->alertXml("WLDayNameInUse");
-+ return;
-+ }
-+
-+
-+ LLComboBox* combo_box = pthis->getChild<LLComboBox>("WLPresetsCombo");
-+
-+ combo_box->add(text);
-+ combo_box->selectByValue(text);
-+
-+ LLWLParamManager::instance()->mDay.mDayList[text] = "NO PATH"; // this is because i'm using a map, change to vector
-+
-+ LLWLParamManager::instance()->mDay.saveDayCycle(text);
-+
-+ // dont need to reload as what is current is current
-+
-+}
-+
-diff --git a/indra/newview/llfloaterdaycycle.h b/indra/newview/llfloaterdaycycle.h
-index edddbb5..cb5fa76 100644
---- a/indra/newview/llfloaterdaycycle.h
-+++ b/indra/newview/llfloaterdaycycle.h
-@@ -99,14 +99,24 @@ public:
- static void onDeleteKey(void* userData);
-
- /// button to load day
-- static void onLoadDayCycle(void* userData);
-+ static void onLoadDayCycle(void * userData);
-
- /// button to save day
-- static void onSaveDayCycle(void* userData);
-+ static void onSaveDayCycle(void * userData);
-+
-+ /// button to add a new day
-+ static void onNewPreset(void * userData);
-+ static void newPromptCallback(S32 option, const LLString& text, void* userData);
-+
-+ /// button to delete a day
-+ static void onDeletePreset(void * userData);
-+ static void deleteAlertCallback(S32 option, void* userdata);
-
- /// toggle for Linden time
- static void onUseLindenTime(void* userData);
-
-+ /// what to do when you change the preset name
-+ static void onChangePresetName(LLUICtrl* ctrl, void* userData);
-
- //// menu management
-
-diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
-index 4626160..a36c654 100644
---- a/indra/newview/llwldaycycle.cpp
-+++ b/indra/newview/llwldaycycle.cpp
-@@ -41,6 +41,7 @@
-
- LLWLDayCycle::LLWLDayCycle() : mDayRate(120)
- {
-+ loadDayCycles();
- }
-
-
-@@ -48,17 +49,91 @@ LLWLDayCycle::~LLWLDayCycle()
- {
- }
-
-+void LLWLDayCycle::loadDayCycles()
-+{
-+
-+ bool found = true;
-+
-+ llinfos << "Searching for default day cycles" << llendl;
-+ LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", ""));
-+
-+ while(found)
-+ {
-+ std::string name;
-+ found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
-+ if(found)
-+ {
-+
-+ // bugfix for SL-46920: preventing filenames that break stuff.
-+ char * curl_str = curl_unescape(name.c_str(), name.size());
-+ std::string unescaped_name(curl_str);
-+ curl_free(curl_str);
-+ curl_str = NULL;
-+
-+ llinfos << "Adding system day cycle " << unescaped_name << " at "<< path_name<<llendl;
-+ std::string tname=unescaped_name.substr(0,unescaped_name.length()-4);
-+ mDayList[tname] = path_name;
-+ }
-+ }
-+
-+ llinfos << "Searching for user day cycles" << llendl;
-+ found=true;
-+
-+ path_name=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", "");
-+ while(found)
-+ {
-+ std::string name;
-+ found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
-+ if(found)
-+ {
-+
-+ // bugfix for SL-46920: preventing filenames that break stuff.
-+ char * curl_str = curl_unescape(name.c_str(), name.size());
-+ std::string unescaped_name(curl_str);
-+ curl_free(curl_str);
-+ curl_str = NULL;
-+
-+ llinfos << "Adding user day cycle " << unescaped_name << " at "<< path_name<<llendl;
-+ std::string tname=unescaped_name.substr(0,unescaped_name.length()-4);
-+ mDayList[tname] = path_name;
-+ }
-+ }
-+}
-+
- void LLWLDayCycle::loadDayCycle(const LLString & fileName)
- {
-+
-+ // bugfix for SL-46920: preventing filenames that break stuff.
-+ char * curl_str = curl_escape(fileName.c_str(), fileName.size());
-+ std::string escaped_filename(curl_str);
-+ curl_free(curl_str);
-+ curl_str = NULL;
-+
-+ escaped_filename += ".xml";
-+
-+
- // clear the first few things
- mTimeMap.clear();
-
- // now load the file
-- LLString pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,
-- "windlight/days", fileName));
-- llinfos << "Loading DayCycle settings from " << pathName << llendl;
-+ LLString pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS ,
-+ "windlight/days", escaped_filename));
-
-- llifstream day_cycle_xml(pathName.c_str());
-+ llifstream day_cycle_xml;
-+ day_cycle_xml.open(pathName.c_str());
-+
-+ if(day_cycle_xml)
-+ llinfos << "Loading USER DayCycle settings from " << pathName << llendl;
-+
-+ if(!day_cycle_xml)
-+ {
-+ LLString pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,
-+ "windlight/days", escaped_filename));
-+ day_cycle_xml.open(pathName.c_str());
-+ if(day_cycle_xml)
-+ llinfos << "Loading Default DayCycle settings from " << pathName << llendl;
-+ }
-+
- if (day_cycle_xml.is_open())
- {
- // load and parse it
-@@ -98,10 +173,19 @@ void LLWLDayCycle::loadDayCycle(const LLString & fileName)
-
- void LLWLDayCycle::saveDayCycle(const LLString & fileName)
- {
-+
-+ // bugfix for SL-46920: preventing filenames that break stuff.
-+ char * curl_str = curl_escape(fileName.c_str(), fileName.size());
-+ std::string escaped_filename(curl_str);
-+ curl_free(curl_str);
-+ curl_str = NULL;
-+
-+ escaped_filename += ".xml";
-+
- LLSD day_data(LLSD::emptyArray());
-
-- LLString pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", fileName));
-- //llinfos << "Saving WindLight settings to " << pathName << llendl;
-+ LLString pathName(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", escaped_filename));
-+ llinfos << "Saving Day cycle settings to " << pathName << llendl;
-
- for(std::map<F32, std::string>::const_iterator mIt = mTimeMap.begin();
- mIt != mTimeMap.end();
-@@ -120,6 +204,29 @@ void LLWLDayCycle::saveDayCycle(const LLString & fileName)
- //day_cycle_xml.close();
- }
-
-+void LLWLDayCycle::deleteDayCycle(std::string name,bool delete_from_disk)
-+{
-+
-+ std::map<std::string, std::string>::iterator mIt = mDayList.find(name);
-+ if(mIt != mDayList.end())
-+ {
-+ mDayList.erase(mIt);
-+ }
-+
-+ if(delete_from_disk)
-+ {
-+ LLString path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", ""));
-+
-+ // use full curl escaped name
-+ char * curl_str = curl_escape(name.c_str(), name.size());
-+ std::string escaped_name(curl_str);
-+ curl_free(curl_str);
-+ curl_str = NULL;
-+
-+ gDirUtilp->deleteFilesInDir(path_name, escaped_name + ".xml");
-+ }
-+}
-+
-
- void LLWLDayCycle::clearKeys()
- {
-diff --git a/indra/newview/llwldaycycle.h b/indra/newview/llwldaycycle.h
-index 85e75c2..c850438 100644
---- a/indra/newview/llwldaycycle.h
-+++ b/indra/newview/llwldaycycle.h
-@@ -48,6 +48,9 @@ public:
-
- // lists what param sets are used when during the day
- std::map<F32, std::string> mTimeMap;
-+ std::map<std::string,std::string> mDayList; //I'm using a map for the moment just incase we suddenly want to be like
-+ // the other WL parameters and hold a class with the details. The second
-+ // string is not actualy used at the moment.
-
- // how long is my day
- F32 mDayRate;
-@@ -60,12 +63,18 @@ public:
- /// simple destructor
- ~LLWLDayCycle();
-
-+ // Load the list of day cycles
-+ void loadDayCycles();
-+
- /// load a day cycle
- void loadDayCycle(const LLString & fileName);
-
- /// load a day cycle
- void saveDayCycle(const LLString & fileName);
-
-+ /// delete a day cycle
-+ void deleteDayCycle(std::string name,bool delete_from_disk);
-+
- /// clear keys
- void clearKeys();
-
-diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
-index 9f23b37..a916823 100644
---- a/indra/newview/llwlparammanager.cpp
-+++ b/indra/newview/llwlparammanager.cpp
-@@ -556,7 +556,7 @@ LLWLParamManager * LLWLParamManager::instance()
- sInstance->loadPresets("");
-
- // load the day
-- sInstance->mDay.loadDayCycle("Default.xml");
-+ sInstance->mDay.loadDayCycle("Default");
-
- // *HACK - sets cloud scrolling to what we want... fix this better in the future
- sInstance->getParamSet("Default", sInstance->mCurParams);
-diff --git a/indra/newview/skins/default/xui/en-us/alerts.xml b/indra/newview/skins/xui/en-us/alerts.xml
-index 08a316a..dd8efc1 100644
---- a/indra/newview/skins/default/xui/en-us/alerts.xml
-+++ b/indra/newview/skins/default/xui/en-us/alerts.xml
-@@ -4555,6 +4555,11 @@ Terrain Detail: Sets the amount of detail you would like to see for the terrain
- No
- </option>
- </alert>
-+ <alert modal="true" name="WLDayNameInUse">
-+ <message name="message">
-+ That name is already in use, please pick a new name.
-+ </message>
-+ </alert>
- <alert modal="true" name="WLNoEditDefault">
- <message name="message">
- You cannot edit or delete a default preset.
-diff --git a/indra/newview/skins/default/xui/en-us/floater_day_cycle_options.xml b/indra/newview/skins/xui/en-us/floater_day_cycle_options.xml
-index 84812b9..a4c6667 100644
---- a/indra/newview/skins/default/xui/en-us/floater_day_cycle_options.xml
-+++ b/indra/newview/skins/default/xui/en-us/floater_day_cycle_options.xml
-@@ -1,9 +1,12 @@
- <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
- <floater bottom="-150" can_close="true" can_drag_on_left="false" can_minimize="true"
-- can_resize="false" height="275" left="50" min_height="180"
-+ can_resize="false" height="300" left="50" min_height="180"
- min_width="400" mouse_opaque="true" name="Day Cycle Floater"
- rect_control="FloaterDayCycleRect" title="Day Cycle Editor" width="646">
-- <tab_container bottom="-275" follows="left|top" height="255" left="0"
-+
-+
-+
-+ <tab_container bottom="-300" follows="left|top" height="255" left="0"
- mouse_opaque="false" name="Day Cycle Tabs" tab_position="top" width="644">
- <panel border="true" bottom="-255" follows="left|top|right|bottom" height="255"
- label="Day Cycle" left="1" mouse_opaque="false"
-@@ -237,14 +240,27 @@
- label="Use Estate Time" label_selected="Go to Estate Time"
- left_delta="55" mouse_opaque="true" name="WLUseLindenTime"
- scale_image="true" width="140" />
-- <button bottom="-195" enabled="true" font="SansSerif" halign="center" height="20"
-- label="Save Test Day" label_selected="Save Test Day"
-+
-+ <combo_box allow_text_entry="false" bottom="-190" follows="left|top" height="18"
-+ left="480" max_chars="20" mouse_opaque="true" name="WLPresetsCombo"
-+ width="150" />
-+
-+ <button bottom="-215" enabled="true" font="SansSerif" halign="center" height="20"
-+ label="New" label_selected="New" left="560"
-+ mouse_opaque="true" name="WLNewPreset" scale_image="true" width="70" />
-+
-+ <button bottom="-235" enabled="true" font="SansSerif" halign="center" height="20"
-+ label="Delete" label_selected="Delete" left="560"
-+ mouse_opaque="true" name="WLDeletePreset" scale_image="true" width="70" />
-+
-+ <button bottom="-215" enabled="true" font="SansSerif" halign="center" height="20"
-+ label="Save" label_selected="Save Test Day"
- left="480" mouse_opaque="true" name="WLSaveDayCycle" scale_image="true"
-- width="150" />
-- <button bottom="-220" enabled="true" font="SansSerif" halign="center" height="20"
-- label="Load Test Day" label_selected="Load Test Day"
-+ width="75" />
-+ <button bottom="-235" enabled="true" font="SansSerif" halign="center" height="20"
-+ label="(Re)Load" label_selected="Load Test Day"
- left="480" mouse_opaque="true" name="WLLoadDayCycle" scale_image="true"
-- width="150" />
-+ width="75" />
- </panel>
- </tab_container>
- </floater>
diff --git a/debian/patches/VWR-7271_fix_mutlist_for_amd64.dpatch b/debian/patches/VWR-7271_fix_mutlist_for_amd64.dpatch
deleted file mode 100644
index 2b5b2b6..0000000
--- a/debian/patches/VWR-7271_fix_mutlist_for_amd64.dpatch
+++ /dev/null
@@ -1,117 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## fix FTBFS on Amd64, thanks Carjay.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: Branch_1-20-Viewer/indra/newview/llmutelist.cpp
-===================================================================
---- Branch_1-20-Viewer.orig/indra/newview/llmutelist.cpp 2008-05-17 00:28:05.000000000 +0200
-+++ Branch_1-20-Viewer/indra/newview/llmutelist.cpp 2008-05-17 00:29:28.000000000 +0200
-@@ -443,40 +443,46 @@
- gAgent.sendReliableMessage();
- }
-
--void notify_automute_callback(const LLUUID& agent_id, const char* first_name, const char* last_name, BOOL is_group, void* user_data)
-+void notify_automute_callback(const LLUUID& agent_id, const char* first_name, const char* last_name, BOOL is_group, void *user_data)
- {
-- U32 temp_data = (U32)user_data;
-- LLMuteList::EAutoReason reason = (LLMuteList::EAutoReason)temp_data;
-- LLUIString auto_message;
-+ if (user_data)
-+ {
-+ U32 *preason = (U32*)user_data;
-+ U32 temp_data = *preason;
-+ delete preason;
-+
-+ LLMuteList::EAutoReason reason = (LLMuteList::EAutoReason)temp_data;
-+ LLUIString auto_message;
-
-- switch (reason)
-- {
-- default:
-- case LLMuteList::AR_IM:
-- auto_message = LLNotifyBox::getTemplateMessage("AutoUnmuteByIM");
-- break;
-- case LLMuteList::AR_INVENTORY:
-- auto_message = LLNotifyBox::getTemplateMessage("AutoUnmuteByInventory");
-- break;
-- case LLMuteList::AR_MONEY:
-- auto_message = LLNotifyBox::getTemplateMessage("AutoUnmuteByMoney");
-- break;
-- }
-+ switch (reason)
-+ {
-+ default:
-+ case LLMuteList::AR_IM:
-+ auto_message = LLNotifyBox::getTemplateMessage("AutoUnmuteByIM");
-+ break;
-+ case LLMuteList::AR_INVENTORY:
-+ auto_message = LLNotifyBox::getTemplateMessage("AutoUnmuteByInventory");
-+ break;
-+ case LLMuteList::AR_MONEY:
-+ auto_message = LLNotifyBox::getTemplateMessage("AutoUnmuteByMoney");
-+ break;
-+ }
-
-- auto_message.setArg("[FIRST]", first_name);
-- auto_message.setArg("[LAST]", last_name);
-+ auto_message.setArg("[FIRST]", first_name);
-+ auto_message.setArg("[LAST]", last_name);
-
-- if (reason == LLMuteList::AR_IM)
-- {
-- LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id);
-- if (timp)
-+ if (reason == LLMuteList::AR_IM)
- {
-- timp->addHistoryLine(auto_message.getString());
-+ LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id);
-+ if (timp)
-+ {
-+ timp->addHistoryLine(auto_message.getString());
-+ }
- }
-- }
-
-- LLChat auto_chat(auto_message.getString());
-- LLFloaterChat::addChat(auto_chat, FALSE, FALSE);
-+ LLChat auto_chat(auto_message.getString());
-+ LLFloaterChat::addChat(auto_chat, FALSE, FALSE);
-+ }
- }
-
-
-@@ -490,6 +496,8 @@
- removed = TRUE;
- remove(automute);
-
-+ U32 *preason = new U32(reason);
-+
- if (first_name.empty() && last_name.empty())
- {
- char cache_first[DB_FIRST_NAME_BUF_SIZE]; /* Flawfinder: ignore */
-@@ -497,18 +505,18 @@
- if (gCacheName->getName(agent_id, cache_first, cache_last))
- {
- // name in cache, call callback directly
-- notify_automute_callback(agent_id, cache_first, cache_last, FALSE, (void *)reason);
-+ notify_automute_callback(agent_id, cache_first, cache_last, FALSE, preason);
- }
- else
- {
- // not in cache, lookup name from cache
-- gCacheName->get(agent_id, FALSE, notify_automute_callback, (void *)reason);
-+ gCacheName->get(agent_id, FALSE, notify_automute_callback, preason);
- }
- }
- else
- {
- // call callback directly
-- notify_automute_callback(agent_id, first_name.c_str(), last_name.c_str(), FALSE, (void *)reason);
-+ notify_automute_callback(agent_id, first_name.c_str(), last_name.c_str(), FALSE, preason);
- }
- }
-
diff --git a/debian/patches/VWR-7831_smart_pointer_explicit_casting.dpatch b/debian/patches/VWR-7831_smart_pointer_explicit_casting.dpatch
deleted file mode 100644
index 335b2c8..0000000
--- a/debian/patches/VWR-7831_smart_pointer_explicit_casting.dpatch
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Explicit casting for smart pointers.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: gcc 4.1.2 and older have issues casting a smart pointer from a base class to
-## DP: a smart pointer to a subclass
-
- at DPATCH@
-
-diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
-index f745aca..829a61b 100644
---- a/indra/newview/llviewerregion.cpp
-+++ b/indra/newview/llviewerregion.cpp
-@@ -108,7 +108,7 @@ public:
-
- void result(const LLSD& content)
- {
-- if(!mRegion || this != mRegion->getHttpResponderPtr())//region is removed or responder is not created.
-+ if(!mRegion || LLHTTPClient::ResponderPtr(this) != mRegion->getHttpResponderPtr())//region is removed or responder is not created.
- {
- return ;
- }
diff --git a/debian/patches/VWR-8194_clamp_outline_for_broken_nvidia.dpatch b/debian/patches/VWR-8194_clamp_outline_for_broken_nvidia.dpatch
deleted file mode 100644
index cc9d0c5..0000000
--- a/debian/patches/VWR-8194_clamp_outline_for_broken_nvidia.dpatch
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## VWR-8194 fix.dpatch by <robin.cornelius at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Clamp selection outline to 660 nodes
-
- at DPATCH@
-
-diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
-index e9c1227..5c1c73e 100644
---- a/indra/llrender/llrender.cpp
-+++ b/indra/llrender/llrender.cpp
-@@ -657,6 +657,9 @@ void LLRender::vertex3fv(const GLfloat* v)
-
- void LLRender::texCoord2f(const GLfloat& x, const GLfloat& y)
- {
-+ if (mCount >= 4096)
-+ return;
-+
- mTexcoordsp[mCount] = LLVector2(x,y);
- }
-
-@@ -672,6 +675,10 @@ void LLRender::texCoord2fv(const GLfloat* tc)
-
- void LLRender::color4ub(const GLubyte& r, const GLubyte& g, const GLubyte& b, const GLubyte& a)
- {
-+
-+ if (mCount >= 4096)
-+ return;
-+
- mColorsp[mCount] = LLColor4U(r,g,b,a);
- }
- void LLRender::color4ubv(const GLubyte* c)
diff --git a/debian/patches/VWR1320_buggy_ati_driver_workaround.dpatch b/debian/patches/VWR1320_buggy_ati_driver_workaround.dpatch
deleted file mode 100644
index 33f26cf..0000000
--- a/debian/patches/VWR1320_buggy_ati_driver_workaround.dpatch
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Full Linux crash by mouse movement + cursor change with fglrx drivers for ATI graphics.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Work around buggy ATI drivers by Henri Beauchamp
-
- at DPATCH@
-
-diff -urN sl117/indra/llwindow/llwindowsdl.cpp sl117-patched/indra/llwindow/llwindowsdl.cpp
---- sl117/indra/llwindow/llwindowsdl.cpp 2007-06-13 19:10:26.000000000 +0200
-+++ sl117-patched/indra/llwindow/llwindowsdl.cpp 2007-06-21 17:55:05.000000000 +0200
-@@ -57,6 +57,9 @@
-
- const S32 MAX_NUM_RESOLUTIONS = 32;
-
-+// static variable for ATI mouse cursor crash-bug work around:
-+static int ATIbug = FALSE;
-+
- //
- // LLWindowSDL
- //
-@@ -2247,6 +2250,10 @@
-
- void LLWindowSDL::setCursor(ECursorType cursor)
- {
-+ if (ATIbug) {
-+ return;
-+ }
-+
- if (mCurrentCursor != cursor)
- {
- if (cursor < UI_CURSOR_COUNT)
-@@ -2316,6 +2323,10 @@
- mSDLCursors[UI_CURSOR_TOOLPAY] = makeSDLCursorFromBMP("toolpay.BMP",0,0);
- mSDLCursors[UI_CURSOR_TOOLOPEN] = makeSDLCursorFromBMP("toolopen.BMP",0,0);
- mSDLCursors[UI_CURSOR_PIPETTE] = makeSDLCursorFromBMP("lltoolpipette.BMP",2,28);
-+
-+ if (getenv("LL_ATI_MOUSE_CURSOR_BUG") != NULL) {
-+ ATIbug = TRUE;
-+ }
- }
-
- void LLWindowSDL::quitCursors()
-diff -urN sl117/indra/newview/linux_tools/wrapper.sh sl117-patched/indra/newview/linux_tools/wrapper.sh
---- sl117/indra/newview/linux_tools/wrapper.sh 2007-06-13 19:10:29.000000000 +0200
-+++ sl117-patched/indra/newview/linux_tools/wrapper.sh 2007-06-21 17:58:58.000000000 +0200
-@@ -43,6 +43,11 @@
- ## - Avoids an often-buggy X feature that doesn't really benefit us anyway.
- export SDL_VIDEO_X11_DGAMOUSE=0
-
-+## - Work around the ATI mouse cursor crash bug:
-+if lsmod | grep fglrx &>/dev/null ; then
-+ export LL_ATI_MOUSE_CURSOR_BUG=x
-+fi
-+
- ## Nothing worth editing below this line.
- ##-------------------------------------------------------------------
-
diff --git a/debian/patches/VWR4070-openjpeg_check_number_of_components.dpatch b/debian/patches/VWR4070-openjpeg_check_number_of_components.dpatch
deleted file mode 100644
index af10856..0000000
--- a/debian/patches/VWR4070-openjpeg_check_number_of_components.dpatch
+++ /dev/null
@@ -1,125 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## VWR4070.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-
-Index: ./indra/llimagej2coj/llimagej2coj.cpp
-===================================================================
---- ./indra/llimagej2coj/llimagej2coj.cpp (revision 367)
-+++ ./indra/llimagej2coj/llimagej2coj.cpp (working copy)
-@@ -134,9 +134,15 @@
- /* open a byte stream */
- cio = opj_cio_open((opj_common_ptr)dinfo, base.getData(), base.getDataSize());
-
-- /* decode the stream and fill the image structure */
-- image = opj_decode(dinfo, cio);
-
-+ /* decode the stream and fill the image structure, also fill in an additional
-+ structure to get the decoding result. This structure is a bit unusual in that
-+ it is not received through opj, but still has some dynamically allocated fields
-+ that need to be cleared up at the end by calling a destroy function. */
-+ opj_codestream_info_t cinfo;
-+ memset(&cinfo, 0, sizeof(opj_codestream_info_t));
-+ image = opj_decode_with_info(dinfo, cio, &cinfo);
-+
- /* close the byte stream */
- opj_cio_close(cio);
-
-@@ -146,30 +152,58 @@
- opj_destroy_decompress(dinfo);
- }
-
-- // The image decode failed if the return was NULL or the component
-- // count was zero. The latter is just a sanity check before we
-- // dereference the array.
-+ /* The image decode failed if the return was NULL or the component
-+ count was zero. The latter is just a sanity check before we
-+ dereference the array. */
- if(!image || !image->numcomps)
- {
- fprintf(stderr, "ERROR -> decodeImpl: failed to decode image!\n");
- if (image)
-+ {
-+ opj_destroy_cstr_info(&cinfo);
- opj_image_destroy(image);
-+ }
-
- return TRUE; // done
- }
-
- // sometimes we get bad data out of the cache - check to see if the decode succeeded
-- for (S32 i = 0; i < image->numcomps; i++)
-- {
-- if (image->comps[i].factor != base.getRawDiscardLevel())
-+ int decompdifference = 0;
-+ if (cinfo.numdecompos) // sanity
-+ {
-+ for (int comp = 0; comp < image->numcomps; comp++)
-+ { /* get maximum decomposition level difference, first field is from the COD header and the second
-+ is what is actually met in the codestream, NB: if everything was ok, this calculation will
-+ return what was set in the cp_reduce value! */
-+ decompdifference = std::max(decompdifference, cinfo.numdecompos[comp] - image->comps[comp].resno_decoded);
-+ }
-+ if (decompdifference < 0) // sanity
- {
-- // if we didn't get the discard level we're expecting, fail
-- opj_image_destroy(image);
-- base.mDecoding = FALSE;
-- return TRUE;
-+ decompdifference = 0;
- }
- }
-+
-+ /* if OpenJPEG failed to decode all requested decomposition levels
-+ the difference will be greater than this level */
-+ if (decompdifference > base.getRawDiscardLevel())
-+ {
-+ llwarns << "not enough data for requested discard level, setting mDecoding to FALSE, difference: " << (decompdifference - base.getRawDiscardLevel()) << llendl;
-+ opj_destroy_cstr_info(&cinfo);
-+ opj_image_destroy(image);
-+
-+ base.mDecoding = FALSE;
-+ return TRUE;
-+ }
-
-+ if(image->numcomps <= first_channel)
-+ {
-+ // sanity
-+ llwarns << "trying to decode more channels than are present in image: numcomps: " << image->numcomps << " first_channel: " << first_channel << llendl;
-+ opj_destroy_cstr_info(&cinfo);
-+ opj_image_destroy(image);
-+ return TRUE;
-+ }
-+
- // Copy image data into our raw image format (instead of the separate channel format
-
- S32 img_components = image->numcomps;
-@@ -191,6 +225,7 @@
- raw_image.resize(width, height, channels);
- U8 *rawp = raw_image.getData();
-
-+
- // first_channel is what channel to start copying from
- // dest is what channel to copy to. first_channel comes from the
- // argument, dest always starts writing at channel zero.
-@@ -212,13 +247,15 @@
- else // Some rare OpenJPEG versions have this bug.
- {
- fprintf(stderr, "ERROR -> decodeImpl: failed to decode image! (NULL comp data - OpenJPEG bug)\n");
-+ opj_destroy_cstr_info(&cinfo);
- opj_image_destroy(image);
-
- return TRUE; // done
- }
- }
-
-- /* free image data structure */
-+ /* free opj data structures */
-+ opj_destroy_cstr_info(&cinfo);
- opj_image_destroy(image);
-
- return TRUE; // done
diff --git a/debian/patches/VWR5636_use_stop_menthod_for_llevent_timer.dpatch b/debian/patches/VWR5636_use_stop_menthod_for_llevent_timer.dpatch
deleted file mode 100644
index b1471c1..0000000
--- a/debian/patches/VWR5636_use_stop_menthod_for_llevent_timer.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## LLEventTimer and LLTimer ignore stop() method.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: patch by Gigs Taggart
-
- at DPATCH@
-
---- linden.orig/indra/llcommon/lltimer.cpp 2008-02-03 17:11:03.000000000 -0500
-+++ linden/indra/llcommon/lltimer.cpp 2008-03-14 09:26:03.538356830 -0400
-@@ -530,7 +530,8 @@
- {
- LLEventTimer* timer = *iter++;
- F32 et = timer->mEventTimer.getElapsedTimeF32();
-- if (et > timer->mPeriod) {
-+ if ((et > timer->mPeriod)&&(timer->mEventTimer.getStarted()))
-+ {
- timer->mEventTimer.reset();
- if ( timer->tick() )
- {
diff --git a/debian/patches/VWR5715_text_not_replaced_by_input_with_japanses_im.dpatch b/debian/patches/VWR5715_text_not_replaced_by_input_with_japanses_im.dpatch
deleted file mode 100644
index 0cb83f9..0000000
--- a/debian/patches/VWR5715_text_not_replaced_by_input_with_japanses_im.dpatch
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Selected Text is not replaced by Input text when Japanese IM is on.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch by Alissa Sabre
-
- at DPATCH@
-
-Index: linden/indra/llui/lllineeditor.cpp
-===================================================================
---- linden/indra/llui/lllineeditor.cpp (revision 535)
-+++ linden/indra/llui/lllineeditor.cpp (revision 536)
-@@ -2315,14 +2315,20 @@
-
- void LLLineEditor::resetPreedit()
- {
-- if (hasPreeditString())
-+ if (hasSelection())
- {
-- if (hasSelection())
-+ if (hasPreeditString())
- {
- llwarns << "Preedit and selection!" << llendl;
- deselect();
- }
--
-+ else
-+ {
-+ deleteSelection();
-+ }
-+ }
-+ if (hasPreeditString())
-+ {
- const S32 preedit_pos = mPreeditPositions.front();
- mText.erase(preedit_pos, mPreeditPositions.back() - preedit_pos);
- mText.insert(preedit_pos, mPreeditOverwrittenWString);
-Index: linden/indra/llui/lltexteditor.cpp
-===================================================================
---- linden/indra/llui/lltexteditor.cpp (revision 535)
-+++ linden/indra/llui/lltexteditor.cpp (revision 536)
-@@ -4333,14 +4333,20 @@
-
- void LLTextEditor::resetPreedit()
- {
-- if (hasPreeditString())
-+ if (hasSelection())
- {
-- if (hasSelection())
-+ if (hasPreeditString())
- {
- llwarns << "Preedit and selection!" << llendl;
- deselect();
- }
--
-+ else
-+ {
-+ deleteSelection(FALSE);
-+ }
-+ }
-+ if (hasPreeditString())
-+ {
- mCursorPos = mPreeditPositions.front();
- removeStringNoUndo(mCursorPos, mPreeditPositions.back() - mCursorPos);
- insertStringNoUndo(mCursorPos, mPreeditOverwrittenWString);
diff --git a/debian/patches/VWR6800_motioncontroller_leak.dpatch b/debian/patches/VWR6800_motioncontroller_leak.dpatch
deleted file mode 100644
index 3e22d7a..0000000
--- a/debian/patches/VWR6800_motioncontroller_leak.dpatch
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## apply VWR6800.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: Branch_1-20-Viewer/indra/llcharacter/llmotioncontroller.cpp
-===================================================================
---- Branch_1-20-Viewer.orig/indra/llcharacter/llmotioncontroller.cpp 2008-04-24 00:13:22.000000000 +0200
-+++ Branch_1-20-Viewer/indra/llcharacter/llmotioncontroller.cpp 2008-04-24 00:19:42.000000000 +0200
-@@ -190,6 +190,11 @@
-
- for_each(mAllMotions.begin(), mAllMotions.end(), DeletePairedPointer());
- mAllMotions.clear();
-+
-+ // LLMotion instances on this list were removed from the AllMotions map
-+ for_each(mDeprecatedMotions.begin(), mDeprecatedMotions.end(), DeletePointer());
-+ mDeprecatedMotions.clear();
-+
- }
-
- //-----------------------------------------------------------------------------
-@@ -379,7 +384,8 @@
- if (motion
- && motion->canDeprecate()
- && motion->getFadeWeight() > 0.01f // not LOD-ed out
-- && (motion->isBlending() || motion->getStopTime() != 0.f))
-+ && (motion->isBlending() || motion->getStopTime() != 0.f)
-+ && motion->isActive())
- {
- deprecateMotionInstance(motion);
- // force creation of new instance
diff --git a/debian/patches/dam_flex_2.5.34.dpatch b/debian/patches/dam_flex_2.5.34.dpatch
deleted file mode 100644
index 4882c61..0000000
--- a/debian/patches/dam_flex_2.5.34.dpatch
+++ /dev/null
@@ -1,22 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## dam flex 2.5.34.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/lscript/lscript_compile/indra.l
-===================================================================
---- ./indra/lscript/lscript_compile/indra.l (revision 178)
-+++ ./indra/lscript/lscript_compile/indra.l (working copy)
-@@ -4,9 +4,6 @@
- H [a-fA-F0-9]
- E [Ee][+-]?{N}+
- FS (f|F)
--%e 10000
--%n 4000
--%p 5000
-
- %{
- #include "linden_common.h"
diff --git a/debian/patches/gstreamer_audio_1.19.1.2.dpatch b/debian/patches/gstreamer_audio_1.19.1.2.dpatch
deleted file mode 100644
index 6e48e4b..0000000
--- a/debian/patches/gstreamer_audio_1.19.1.2.dpatch
+++ /dev/null
@@ -1,240 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## gstreamer streaming audio.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: gstreamer streaming audio
-
- at DPATCH@
-
-diff -ur ./indra/llaudio/audioengine.h ./indra/llaudio/audioengine.h
---- ./indra/llaudio/audioengine.h 2008-03-15 21:23:17.000000000 +0000
-+++ ./indra/llaudio/audioengine.h 2008-03-15 20:43:12.000000000 +0000
-@@ -144,6 +144,7 @@
- // use a value from 0.0 to 1.0, inclusive
- virtual void setInternetStreamGain(F32 vol) { mInternetStreamGain = vol; }
- virtual const char* getInternetStreamURL() { return ""; }
-+ virtual void InitStreamer() = 0;
-
- // For debugging usage
- virtual LLVector3 getListenerPos();
-diff -ur ./indra/llaudio/audioengine_openal.cpp ./indra/llaudio/audioengine_openal.cpp
---- ./indra/llaudio/audioengine_openal.cpp 2008-03-15 21:24:16.000000000 +0000
-+++ ./indra/llaudio/audioengine_openal.cpp 2008-03-15 20:14:23.000000000 +0000
-@@ -185,21 +187,48 @@
-
- // ------------
-
-+
-+void LLAudioEngine_OpenAL::InitStreamer()
-+{
-+
-+ m_streamer=new LLMediaImplGStreamer ();
-+
-+ if(!m_streamer)
-+ {
-+ llwarns << "LLAudioEngine_OpenAL::LLAudioEngine_OpenAL() Failed to create our private gstreamer audio instance" << llendl;
-+ }
-+
-+ if(m_streamer)
-+ {
-+ m_streamer->init ();
-+ }
-+
-+}
-+
-+
- void LLAudioEngine_OpenAL::initInternetStream(){
-- mInternetStreamURL = NULL;
-+ mInternetStreamURL.erase();
-+
- }
-
--void LLAudioEngine_OpenAL::startInternetStream(const char* url){
-- if(mInternetStreamURL){
-- delete mInternetStreamURL;
-- }
-+void LLAudioEngine_OpenAL::startInternetStream(const char * url_cstr){
-+
-+ std::string url(url_cstr);
-+
-+ if(!m_streamer)
-+ return;
-
-- if (url) {
-+ if (!url.empty()) {
- llinfos << "LLAudioEngine_OpenAL::startInternetStream() Starting internet stream: " << url << llendl;
-- mInternetStreamURL = new std::string(url);
-+ mInternetStreamURL=url;
-+ m_streamer->navigateTo ( url );
-+ llinfos << "Playing....." << llendl;
-+ m_streamer->play ();
-+
- }else{
-- llinfos << "LLAudioEngine_OpenAL::startInternetStream() Set internet stream to null" << llendl;
-- mInternetStreamURL = NULL;
-+ llinfos << "LLAudioEngine_OpenAL seting stream to NULL"<< llendl;
-+ mInternetStreamURL.erase();
-+ m_streamer->stop ();
- }
- }
-
-@@ -207,28 +236,53 @@
- }
-
- void LLAudioEngine_OpenAL::stopInternetStream(){
-+ mInternetStreamURL.erase();
-+ m_streamer->stop ();
- }
-
- void LLAudioEngine_OpenAL::pauseInternetStream(int pause){
-+
-+ if(!m_streamer)
-+ return;
-+
-+ if(pause)
-+ m_streamer->pause();
-+ else
-+ m_streamer->play();
-+
- }
-
- int LLAudioEngine_OpenAL::isInternetStreamPlaying(){
-- if(mInternetStreamURL){
-- return 2; // "Paused"
-- }else{
-+
-+ if(!m_streamer)
- return 0;
-+
-+ if(m_streamer->isPlaying())
-+ {
-+ return 1; // Active and playing
-+ }
-+ if(m_streamer->isPaused())
-+ {
-+ return 2; // paused
- }
-+
-+ return 0; // Stopped
- }
-
- void LLAudioEngine_OpenAL::getInternetStreamInfo(char* artist_out, char* title_out){
- }
-
- void LLAudioEngine_OpenAL::setInternetStreamGain(F32 vol){
-+ // Set the gstreamer volume here
-+ if(!m_streamer)
-+ return;
-+
-+ vol = llclamp(vol, 0.f, 1.f);
-+ m_streamer->setVolume(vol);
- }
-
- const char* LLAudioEngine_OpenAL::getInternetStreamURL(){
-- if(mInternetStreamURL){
-- return mInternetStreamURL->c_str();
-- }
-- return "";
-+ return mInternetStreamURL.c_str();
- }
-+
-+
-diff -ur ./indra/llaudio/audioengine_openal.h ./indra/llaudio/audioengine_openal.h
---- ./indra/llaudio/audioengine_openal.h 2008-03-15 21:24:16.000000000 +0000
-+++ ./indra/llaudio/audioengine_openal.h 2008-03-15 20:24:17.000000000 +0000
-@@ -5,6 +5,8 @@
-
- #include "audioengine.h"
- #include "listener_openal.h"
-+#include "llmediaimplgstreamer.h"
-+
-
- class LLAudioEngine_OpenAL : public LLAudioEngine{
- public:
-@@ -25,7 +27,7 @@
-
- // Internet stream methods
- virtual void initInternetStream();
-- virtual void startInternetStream(const char* url);
-+ virtual void startInternetStream(const char * url_cstr);
- virtual void stopInternetStream();
- virtual void updateInternetStream();
- virtual void pauseInternetStream(int pause);
-@@ -33,13 +35,16 @@
- virtual void getInternetStreamInfo(char* artist, char* title);
- virtual void setInternetStreamGain(F32 vol);
- virtual const char* getInternetStreamURL();
-+ virtual void InitStreamer();
-
- void initWind();
- void cleanupWind();
- void updateWind(LLVector3 direction, F32 camera_altitude);
-
- protected:
-- std::string* mInternetStreamURL;
-+ std::string mInternetStreamURL;
-+ LLMediaImplGStreamer * m_streamer;
-+
- };
-
- class LLAudioChannelOpenAL : public LLAudioChannel{
---- ./indra/llmedia/llmediaimplgstreamer.cpp 2008-03-15 23:06:08.000000000 +0000
-+++ ./indra/llmedia/llmediaimplgstreamer.cpp 2008-03-15 23:06:02.000000000 +0000
-@@ -618,4 +619,25 @@
- return false;
- }
-
-+bool LLMediaImplGStreamer::isPaused()
-+{
-+
-+ if(getStatus() == LLMediaBase::STATUS_PAUSED)
-+ return true;
-+
-+ return false;
-+
-+}
-+
-+bool LLMediaImplGStreamer::isPlaying()
-+{
-+
-+ if(getStatus() == LLMediaBase::STATUS_STARTED)
-+ return true;
-+
-+ return false;
-+
-+}
-+
-+
- #endif // LL_GSTREAMER_ENABLED
---- ./indra/llmedia/llmediaimplgstreamer.h 2008-03-15 23:06:08.000000000 +0000
-+++ ./indra/llmedia/llmediaimplgstreamer.h 2008-03-15 23:02:41.000000000 +0000
-@@ -80,12 +80,16 @@
-
- bool stop();
- bool play();
-+ bool pause();
- LLMediaEmitter< LLMediaObserver > getEventEmitter() const {return mEventEmitter;};
-+ bool isPlaying();
-+ bool isPaused();
-+
-
- private:
- // misc
- bool unload();
-- bool pause();
-+
- unsigned char* mediaData;
- int mMediaRowbytes;
-
---- ./indra/newview/llstartup.cpp 2008-03-15 23:31:02.000000000 +0000
-+++ ./indra/newview/llstartup.cpp 2008-03-15 21:24:16.000000000 +0000
-@@ -641,6 +641,9 @@
- LLViewerMedia::initClass();
- LLViewerParcelMedia::initClass();
-
-+ if (gAudiop)
-+ gAudiop->InitStreamer();
-+
- if (gViewerWindow)
- {
- audio_update_volume(true);
diff --git a/debian/patches/oldpatch/0000_dont_use_java_prototypes.dpatch b/debian/patches/oldpatch/0000_dont_use_java_prototypes.dpatch
deleted file mode 100644
index b0541bc..0000000
--- a/debian/patches/oldpatch/0000_dont_use_java_prototypes.dpatch
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## don't use java prototypes.dpatch by <robin.cornelius at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Some java style prototypes have appeared upstream
-
- at DPATCH@
-
-Index: ./indra/llmessage/llcurl.h
-===================================================================
---- ./indra/llmessage/llcurl.h (revision 242)
-+++ ./indra/llmessage/llcurl.h (working copy)
-@@ -150,8 +150,8 @@
- static std::vector<LLMutex*> sSSLMutex;
-
- // OpenSSL callbacks
-- static void LLCurl::ssl_locking_callback(int mode, int type, const char *file, int line);
-- static unsigned long LLCurl::ssl_thread_id(void);
-+ static void ssl_locking_callback(int mode, int type, const char *file, int line);
-+ static unsigned long ssl_thread_id(void);
-
-
-
-Index: ./indra/newview/llmimetypes.h
-===================================================================
---- ./indra/newview/llmimetypes.h (revision 242)
-+++ ./indra/newview/llmimetypes.h (working copy)
-@@ -68,7 +68,7 @@
- static bool findAllowResize(const LLString& mime_type);
- // accessor for flag to enable/disable media size edit fields
-
-- static bool LLMIMETypes::findAllowLooping(const LLString& mime_type);
-+ static bool findAllowLooping(const LLString& mime_type);
- // accessor for flag to enable/disable media looping checkbox
-
- public:
diff --git a/debian/patches/oldpatch/0001_minor_leak_slulr_menu_in_llviewertexteditor.patch.dpatch b/debian/patches/oldpatch/0001_minor_leak_slulr_menu_in_llviewertexteditor.patch.dpatch
deleted file mode 100644
index f89ae9d..0000000
--- a/debian/patches/oldpatch/0001_minor_leak_slulr_menu_in_llviewertexteditor.patch.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 0001_minor_leak_slulr_menu_in_llviewertexteditor.patch.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: 0001_minor_leak_slulr_menu_in_llviewertexteditor.patch
-
- at DPATCH@
-
---- linden/indra/newview/llviewertexteditor.cpp 2007-11-29 14:51:22.000000000 +0100
-+++ linden/indra/newview/llviewertexteditor.cpp 2007-12-03 14:51:37.866625000 +0100
-@@ -591,6 +591,10 @@
- // The inventory callback may still be in use by gInventoryCallbackManager...
- // so set its reference to this to null.
- mInventoryCallback->setEditor(NULL);
-+
-+ LLMenuGL* menu = (LLMenuGL*)LLView::getViewByHandle(mPopupMenuHandle);
-+ mPopupMenuHandle.markDead();
-+ delete menu;
- }
-
- ///////////////////////////////////////////////////////////////////
diff --git a/debian/patches/oldpatch/0001_no_more_asstachments.patch.dpatch b/debian/patches/oldpatch/0001_no_more_asstachments.patch.dpatch
deleted file mode 100644
index b9b8d91..0000000
--- a/debian/patches/oldpatch/0001_no_more_asstachments.patch.dpatch
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 0001_no_more_asstachments.patch.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: 0001_no_more_asstachments.patch
-
- at DPATCH@
-
---- linden/indra/newview/llviewerjointattachment.cpp 2007-11-29 14:51:22.000000000 +0100
-+++ linden/indra/newview/llviewerjointattachment.cpp 2007-12-12 22:40:43.836168000 +0100
-@@ -174,7 +174,14 @@
- if (mAttachedObject)
- {
- llwarns << "Attempted to attach object where an attachment already exists!" << llendl;
-- return FALSE;
-+
-+ if (mAttachedObject==object) {
-+ llinfos << "objects are same, passing to let (re-)setup object/drawable!" << llendl;
-+ }
-+ else {
-+ llinfos << "objects differ, killing existing object and proceeding with new!" << llendl;
-+ gObjectList.killObject(mAttachedObject);
-+ }
- }
- mAttachedObject = object;
-
diff --git a/debian/patches/oldpatch/0001_texture_cache_hiccups.v2.patch.dpatch b/debian/patches/oldpatch/0001_texture_cache_hiccups.v2.patch.dpatch
deleted file mode 100644
index a46b76c..0000000
--- a/debian/patches/oldpatch/0001_texture_cache_hiccups.v2.patch.dpatch
+++ /dev/null
@@ -1,145 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 0001_texture_cache_hiccups.v2.patch.dpatch by <robin at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: 0001_texture_cache_hiccups.v2.patch
-
- at DPATCH@
-
---- linden-orig/indra/newview/lltexturecache.h 2007-09-20 12:36:50.000000000 +0200
-+++ linden/indra/newview/lltexturecache.h 2007-09-24 21:54:54.531250000 +0200
-@@ -111,6 +114,7 @@
- void readHeaderCache(apr_pool_t* poolp = NULL);
- void purgeAllTextures(bool purge_directories);
- void purgeTextures(bool validate);
-+ void purgeTextureFilesTimeSliced(BOOL force_all = FALSE);
- S32 getHeaderCacheEntry(const LLUUID& id, bool touch, S32* imagesize = NULL);
- bool removeHeaderCacheEntry(const LLUUID& id);
- void lockHeaders() { mHeaderMutex.lock(); }
-@@ -132,6 +136,10 @@
-
- typedef std::vector<std::pair<LLPointer<Responder>, bool> > responder_list_t;
- responder_list_t mCompletedList;
-+
-+ typedef std::list<std::string> filename_list_t;
-+ filename_list_t mFilesToDelete;
-+ LLTimer mTimeLastFileDelete;
-
- BOOL mReadOnly;
-
---- linden-orig/indra/newview/lltexturecache.cpp 2007-09-20 12:36:50.000000000 +0200
-+++ linden/indra/newview/lltexturecache.cpp 2007-09-24 21:54:54.500000000 +0200
-@@ -736,6 +736,8 @@
-
- LLTextureCache::~LLTextureCache()
- {
-+ purgeTextureFilesTimeSliced(TRUE); // force-flush all pending file deletes
-+
- apr_pool_destroy(mFileAPRPool);
- }
-
-@@ -1038,14 +1040,14 @@
- return;
- }
-
-- llinfos << "TEXTURE CACHE: Reading Entries..." << llendl;
-+ llinfos << "TEXTURE CACHE: Reading " << num_entries << " Entries from " << mTexturesDirEntriesFileName << llendl;
-
- std::map<LLUUID, S32> entry_idx_map;
- S64 total_size = 0;
- for (S32 idx=0; idx<num_entries; idx++)
- {
- const LLUUID& id = entries[idx].mID;
--// llinfos << "Entry: " << id << " Size: " << entries[i].mSize << " Time: " << entries[i].mTime << llendl;
-+// llinfos << "Entry: " << id << " Size: " << entries[idx].mSize << " Time: " << entries[idx].mTime << llendl;
- std::map<LLUUID, S32>::iterator iter = entry_idx_map.find(id);
- if (iter != entry_idx_map.end())
- {
-@@ -1067,7 +1069,7 @@
- llinfos << "TEXTURE CACHE: Validating: " << validate_idx << llendl;
- }
-
-- S64 min_cache_size = (sCacheMaxTexturesSize * 9) / 10;
-+ S64 min_cache_size = sCacheMaxTexturesSize / 100 * 95;
- S32 purge_count = 0;
- S32 next_idx = 0;
- for (S32 idx=0; idx<num_entries; idx++)
-@@ -1101,8 +1103,8 @@
- if (purge_entry)
- {
- purge_count++;
--// llinfos << "PURGING: " << filename << llendl;
-- ll_apr_file_remove(filename, NULL);
-+ // llinfos << "PURGING: " << filename << llendl;
-+ mFilesToDelete.push_back(filename);
- total_size -= entries[idx].mSize;
- entries[idx].mSize = 0;
- }
-@@ -1117,7 +1119,11 @@
- }
- num_entries = next_idx;
-
-- llinfos << "TEXTURE CACHE: Writing Entries: " << num_entries << llendl;
-+ mTimeLastFileDelete.reset();
-+
-+ llinfos << "TEXTURE CACHE: Writing Entries: " << num_entries
-+ << " (" << num_entries*sizeof(Entry)/1024 << "KB)"
-+ << llendl;
-
- ll_apr_file_remove(mTexturesDirEntriesFileName, NULL);
- ll_apr_file_write_ex(mTexturesDirEntriesFileName, NULL,
-@@ -1137,10 +1143,53 @@
- llinfos << "TEXTURE CACHE:"
- << " PURGED: " << purge_count
- << " ENTRIES: " << num_entries
-- << " CACHE SIZE: " << total_size / 1024*1024 << " MB"
-+ << " CACHE SIZE: " << total_size/1024/1024 << " MB"
- << llendl;
- }
-
-+
-+void LLTextureCache::purgeTextureFilesTimeSliced(BOOL force_all)
-+{
-+ LLMutexLock lock(&mHeaderMutex);
-+
-+ F32 delay_between_passes = 1.0f; // seconds
-+ F32 max_time_per_pass = 0.1f; // seconds
-+
-+ if (!force_all && mTimeLastFileDelete.getElapsedTimeF32() <= delay_between_passes)
-+ {
-+ return;
-+ }
-+
-+ LLTimer timer;
-+ S32 howmany = 0;
-+
-+ llinfos << "TEXTURE CACHE: " << mFilesToDelete.size() << " files scheduled for deletion" << llendl;
-+
-+ for (LLTextureCache::filename_list_t::iterator iter = mFilesToDelete.begin(); iter!=mFilesToDelete.end(); )
-+ {
-+ LLTextureCache::filename_list_t::iterator iter2 = iter++;
-+ ll_apr_file_remove(*iter2, NULL);
-+ mFilesToDelete.erase(iter2);
-+ howmany++;
-+
-+ if (!force_all && timer.getElapsedTimeF32() > max_time_per_pass)
-+ {
-+ break;
-+ }
-+ }
-+
-+ if (!mFilesToDelete.empty())
-+ {
-+ llinfos << "TEXTURE CACHE: "<< howmany << " files deleted ("
-+ << mFilesToDelete.size() << " files left for next pass)"
-+ << llendl;
-+ }
-+
-+ mTimeLastFileDelete.reset();
-+}
-+
-+
-+
- //////////////////////////////////////////////////////////////////////////////
-
- // call lockWorkers() first!
diff --git a/debian/patches/oldpatch/26_gtk_api_change.dpatch b/debian/patches/oldpatch/26_gtk_api_change.dpatch
deleted file mode 100644
index e36b9c2..0000000
--- a/debian/patches/oldpatch/26_gtk_api_change.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## GTK api change patch.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/llwindow/llwindowsdl.cpp
-===================================================================
---- ./indra/llwindow/llwindowsdl.cpp (revision 57)
-+++ ./indra/llwindow/llwindowsdl.cpp (working copy)
-@@ -135,7 +135,7 @@
- << gtk_major_version << "."
- << gtk_minor_version << "."
- << gtk_micro_version << llendl;
-- gchar *gtk_warning;
-+ const gchar *gtk_warning;
- maybe_lock_display();
- gtk_warning = gtk_check_version(GTK_MAJOR_VERSION,
- GTK_MINOR_VERSION,
diff --git a/debian/patches/oldpatch/3737_fix_gstreamer.dpatch b/debian/patches/oldpatch/3737_fix_gstreamer.dpatch
deleted file mode 100644
index 98342cf..0000000
--- a/debian/patches/oldpatch/3737_fix_gstreamer.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Fix gstreamer classes.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: llmediaimplgstreamervidplug.h
-===================================================================
---- ./indra/llmedia/llmediaimplgstreamervidplug.h (revision 133)
-+++ ./indra/llmedia/llmediaimplgstreamervidplug.h (working copy)
-@@ -90,7 +90,7 @@
-
- struct _GstSLVideoClass
- {
-- GstVideoSink parent_class;
-+ GstVideoSinkClass parent_class;
- };
-
- GType gst_slvideo_get_type (void);
diff --git a/debian/patches/oldpatch/VWR1352_fix_strange_llstyle_copy_operation.dpatch b/debian/patches/oldpatch/VWR1352_fix_strange_llstyle_copy_operation.dpatch
deleted file mode 100644
index 5b268c9..0000000
--- a/debian/patches/oldpatch/VWR1352_fix_strange_llstyle_copy_operation.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## A strange copy operation of LLStyle.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch by Alissa Sabre
-
- at DPATCH@
-
-Index: linden/indra/llui/llstyle.cpp
-===================================================================
---- linden/indra/llui/llstyle.cpp (revision 53)
-+++ linden/indra/llui/llstyle.cpp (working copy)
-@@ -112,7 +112,7 @@
- mItalic = rhs.mItalic;
- mBold = rhs.mBold;
- mUnderline = rhs.mUnderline;
-- mDropShadow = rhs.mUnderline;
-+ mDropShadow = rhs.mDropShadow;
- mIsEmbeddedItem = rhs.mIsEmbeddedItem;
- }
-
diff --git a/debian/patches/oldpatch/VWR2142_parcel_voice_icon_doesnt_reflect_status_if_voice_is_not_used.dpatch b/debian/patches/oldpatch/VWR2142_parcel_voice_icon_doesnt_reflect_status_if_voice_is_not_used.dpatch
deleted file mode 100644
index 94c59b2..0000000
--- a/debian/patches/oldpatch/VWR2142_parcel_voice_icon_doesnt_reflect_status_if_voice_is_not_used.dpatch
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Parcel voice icon doesn't reflect disabled status if voice isn't used.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch by Henri Beauchamp
-
- at DPATCH@
-
-diff -urN linden/indra/newview/llstatusbar.cpp linden-patched/indra/newview/llstatusbar.cpp
---- linden/indra/newview/llstatusbar.cpp 2008-01-04 00:07:13.000000000 +0100
-+++ linden-patched/indra/newview/llstatusbar.cpp 2008-01-07 22:38:45.000000000 +0100
-@@ -388,26 +388,18 @@
- childSetVisible("restrictpush", FALSE);
- }
-
-- BOOL voice_enabled = gVoiceClient->voiceEnabled();
- BOOL have_voice = parcel && parcel->getVoiceEnabled();
-- if (!voice_enabled)
-+ if (have_voice)
- {
- childSetVisible("status_no_voice", FALSE);
- }
- else
- {
-- if (have_voice)
-- {
-- childSetVisible("status_no_voice", FALSE);
-- }
-- else if (!have_voice)
-- {
-- childSetVisible("status_no_voice", TRUE);
-- childGetRect( "status_no_voice", buttonRect );
-- r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
-- childSetRect( "status_no_voice", r );
-- x += buttonRect.getWidth();
-- }
-+ childSetVisible("status_no_voice", TRUE);
-+ childGetRect( "status_no_voice", buttonRect );
-+ r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
-+ childSetRect( "status_no_voice", r );
-+ x += buttonRect.getWidth();
- }
-
- BOOL canBuyLand = parcel
diff --git a/debian/patches/oldpatch/VWR3605_Object_group_display_not_properly_set_for_no-group_objects.dpatch b/debian/patches/oldpatch/VWR3605_Object_group_display_not_properly_set_for_no-group_objects.dpatch
deleted file mode 100644
index f3ca472..0000000
--- a/debian/patches/oldpatch/VWR3605_Object_group_display_not_properly_set_for_no-group_objects.dpatch
+++ /dev/null
@@ -1,25 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Object group display not properly set for no-group objects.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch by Jacek Antonelli
-
- at DPATCH@
-
-Index: linden/indra/newview/llpanelpermissions.cpp
-===================================================================
-@@ -337,6 +337,14 @@
- mLabelGroupName->setEnabled(TRUE);
- }
- }
-+ else
-+ {
-+ if(mLabelGroupName)
-+ {
-+ mLabelGroupName->setNameID(LLUUID::null, TRUE);
-+ mLabelGroupName->setEnabled(FALSE);
-+ }
-+ }
- childSetEnabled("button set group",owners_identical && (mOwnerID == gAgent.getID()));
-
- // figure out the contents of the name, description, & category
diff --git a/debian/patches/oldpatch/VWR3857_show_non_latin1_characters_in_lsl_editor.dpatch b/debian/patches/oldpatch/VWR3857_show_non_latin1_characters_in_lsl_editor.dpatch
deleted file mode 100644
index 14c2750..0000000
--- a/debian/patches/oldpatch/VWR3857_show_non_latin1_characters_in_lsl_editor.dpatch
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Script (LSL) editor shows non Latin 1 characters as square boxes.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch by Alissa Sabre
-
- at DPATCH@
-
-Index: linden/indra/llrender/llfontgl.cpp
-===================================================================
---- linden/indra/llrender/llfontgl.cpp (.../tags/1.18.5.3) (revision 435)
-+++ linden/indra/llrender/llfontgl.cpp (.../tags/20071217) (revision 435)
-@@ -54,6 +54,7 @@
- LLFontGL* LLFontGL::sSansSerifBig = NULL;
- LLFontGL* LLFontGL::sSansSerifHuge = NULL;
- LLFontGL* LLFontGL::sSansSerifBold = NULL;
-+LLFontList* LLFontGL::sMonospaceFallback = NULL;
- LLFontList* LLFontGL::sSSFallback = NULL;
- LLFontList* LLFontGL::sSSSmallFallback = NULL;
- LLFontList* LLFontGL::sSSBigFallback = NULL;
-@@ -304,8 +305,22 @@
- sMonospace->reset();
- }
-
-- failed |= !loadFace(sMonospace, monospace_file, monospace_size, NULL);
-+ if (sMonospaceFallback)
-+ {
-+ delete sMonospaceFallback;
-+ }
-+ sMonospaceFallback = new LLFontList();
-+ if (!loadFaceFallback(
-+ sMonospaceFallback,
-+ sanserif_fallback_file,
-+ monospace_size * ss_fallback_scale))
-+ {
-+ delete sMonospaceFallback;
-+ sMonospaceFallback = NULL;
-+ }
-
-+ failed |= !loadFace(sMonospace, monospace_file, monospace_size, sMonospaceFallback);
-+
- //
- // Sans-serif fonts
- //
-Index: linden/indra/llrender/llfontgl.h
-===================================================================
---- linden/indra/llrender/llfontgl.h (.../tags/IME-20071201) (revision 435)
-+++ linden/indra/llrender/llfontgl.h (.../branches/1.18.5.3-IME) (revision 435)
-@@ -223,6 +223,7 @@
- static LLString sAppDir; // For loading fonts
-
- static LLFontGL* sMonospace; // medium
-+ static LLFontList* sMonospaceFallback;
-
- static LLFontGL* sSansSerifSmall; // small
- static LLFontList* sSSSmallFallback;
diff --git a/debian/patches/oldpatch/VWR6154_audiodecodemgr.patch b/debian/patches/oldpatch/VWR6154_audiodecodemgr.patch
deleted file mode 100644
index b62c13d..0000000
--- a/debian/patches/oldpatch/VWR6154_audiodecodemgr.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 99-unnamed.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: release/indra/llaudio/llaudiodecodemgr.cpp
-===================================================================
---- release.orig/indra/llaudio/llaudiodecodemgr.cpp 2008-04-06 22:24:28.000000000 +0200
-+++ release/indra/llaudio/llaudiodecodemgr.cpp 2008-04-06 22:24:42.000000000 +0200
-@@ -443,7 +443,7 @@
- }
- #if !defined(USE_WAV_VFILE)
- mBytesRead = -1;
-- mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, data_length,
-+ mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(),
- new WriteResponder(this));
- #endif
- }
diff --git a/debian/patches/oldpatch/VWR747_texture_resozes_only_proportionately_tp_recieved_dimensions.dpatch b/debian/patches/oldpatch/VWR747_texture_resozes_only_proportionately_tp_recieved_dimensions.dpatch
deleted file mode 100644
index 8100fa8..0000000
--- a/debian/patches/oldpatch/VWR747_texture_resozes_only_proportionately_tp_recieved_dimensions.dpatch
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Texture resizes only proportionately to received dimensions.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch by linden labs DEV11416, Thanks Tofu
-
- at DPATCH@
-
-Index: ../indra/newview/llpreviewtexture.cpp
-===================================================================
---- ../indra/newview/llpreviewtexture.cpp (revision 81508)
-+++ ../indra/newview/llpreviewtexture.cpp (working copy)
-@@ -195,7 +195,7 @@
- {
- if( getVisible() )
- {
-- updateAspectRatio();
-+ updateDimensions();
-
- LLPreview::draw();
-
-@@ -380,7 +380,7 @@
-
- // It takes a while until we get height and width information.
- // When we receive it, reshape the window accordingly.
--void LLPreviewTexture::updateAspectRatio()
-+void LLPreviewTexture::updateDimensions()
- {
- if (!mImage) return;
-
-@@ -389,24 +389,21 @@
- // Attempt to make the image 1:1 on screen.
- // If that fails, cut width by half.
- S32 client_width = image_width;
-+ S32 client_height = image_height;
- S32 horiz_pad = 2 * (LLPANEL_BORDER_WIDTH + PREVIEW_PAD) + PREVIEW_RESIZE_HANDLE_SIZE;
- S32 vert_pad = PREVIEW_HEADER_SIZE + 2 * CLIENT_RECT_VPAD + LLPANEL_BORDER_WIDTH;
-- S32 screen_width = gViewerWindow->getWindowWidth();
-- S32 max_client_width = screen_width - horiz_pad;
-+ S32 max_client_width = gViewerWindow->getWindowWidth() - horiz_pad;
- S32 max_client_height = gViewerWindow->getWindowHeight() - vert_pad;
-- F32 inv_aspect_ratio = (F32) image_height / (F32) image_width;
-
-- while ((client_width > max_client_width) || ( llround(client_width * inv_aspect_ratio) > max_client_height ) )
-+ while ((client_width > max_client_width) ||
-+ (client_height > max_client_height ) )
- {
- client_width /= 2;
-+ client_height /= 2;
- }
-
- S32 view_width = client_width + horiz_pad;
--
-- // Adjust the height based on the width computed above.
-- S32 client_height = llround(client_width * inv_aspect_ratio);
- S32 view_height = client_height + vert_pad;
--
-
- // set text on dimensions display (should be moved out of here and into a callback of some sort)
- childSetTextArg("dimensions", "[WIDTH]", llformat("%d", mImage->mFullWidth));
-@@ -462,26 +459,20 @@
- else
- {
- client_width = getRect().getWidth() - horiz_pad;
-- client_height = llround(client_width * inv_aspect_ratio);
-+ client_height = getRect().getHeight() - vert_pad;
- }
-
-+ S32 max_height = getRect().getHeight() - PREVIEW_BORDER - button_height
-+ - CLIENT_RECT_VPAD - info_height - CLIENT_RECT_VPAD - PREVIEW_HEADER_SIZE;
-+ S32 max_width = getRect().getWidth() - horiz_pad;
-
-- S32 max_height = getRect().getHeight() - PREVIEW_BORDER - button_height
-- - CLIENT_RECT_VPAD - info_height - CLIENT_RECT_VPAD - PREVIEW_HEADER_SIZE;
-- max_height = llmax(max_height, 1);
--
-- if (client_height > max_height)
-- {
-- F32 aspect_ratio = (F32) image_width / (F32) image_height;
-- client_height = max_height;
-- client_width = llround(client_height * aspect_ratio);
-- }
-+ client_height = llclamp(client_height, 1, max_height);
-+ client_width = llclamp(client_width, 1, max_width);
-
- LLRect window_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
- window_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD);
- window_rect.mBottom += PREVIEW_BORDER + button_height + CLIENT_RECT_VPAD + info_height + CLIENT_RECT_VPAD;
-
-- // try to keep aspect ratio when hosted, as hosting view can resize without user input
- mClientRect.setLeftTopAndSize(window_rect.getCenterX() - (client_width / 2), window_rect.mTop, client_width, client_height);
- }
-
-Index: ../indra/newview/llpreviewtexture.h
-===================================================================
---- ../indra/newview/llpreviewtexture.h (revision 81508)
-+++ ../indra/newview/llpreviewtexture.h (working copy)
-@@ -78,11 +78,11 @@
-
- protected:
- void init();
-- void updateAspectRatio();
-
- virtual const char *getTitleName() const { return "Texture"; }
-
--protected:
-+private:
-+ void updateDimensions();
- LLUUID mImageID;
- LLPointer<LLViewerImage> mImage;
- BOOL mLoadingFullImage;
diff --git a/debian/patches/oldpatch/slviewer-1.18.6.1-openal.patch b/debian/patches/oldpatch/slviewer-1.18.6.1-openal.patch
deleted file mode 100644
index 0d84a88..0000000
--- a/debian/patches/oldpatch/slviewer-1.18.6.1-openal.patch
+++ /dev/null
@@ -1,629 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## openal patch.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/llaudio/audioengine.cpp
-===================================================================
---- ./indra/llaudio/audioengine.cpp 2008-01-23 11:41:35.000000000 +0000
-+++ ./indra/llaudio/audioengine.cpp 2008-01-23 11:41:51.000000000 +0000
-@@ -1323,7 +1323,7 @@
- BOOL LLAudioSource::isDone()
- {
- const F32 MAX_AGE = 60.f;
-- const F32 MAX_UNPLAYED_AGE = 15.f;
-+ const F32 MAX_UNPLAYED_AGE = 30.f;
- if (isLoop())
- {
- // Looped sources never die on their own.
-Index: ./indra/llaudio/audioengine_fmod.cpp
-===================================================================
---- ./indra/llaudio/audioengine_fmod.cpp 2008-01-23 11:41:35.000000000 +0000
-+++ ./indra/llaudio/audioengine_fmod.cpp 2008-01-23 11:41:51.000000000 +0000
-@@ -288,6 +288,13 @@
-
- void LLAudioEngine_FMOD::shutdown()
- {
-+#if LL_RELEASE_FOR_DOWNLOAD
-+ // This hack exists because fmod likes to occasionally hang forever
-+ // when shutting down for no apparent reason.
-+ llwarns << "Hack, skipping audio engine cleanup" << llendflush;
-+ return;
-+#endif
-+
- if (gWindDSP)
- {
- FSOUND_DSP_SetActive(gWindDSP,FALSE);
-Index: ./indra/llaudio/audioengine_openal.cpp
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ ./indra/llaudio/audioengine_openal.cpp 2008-01-23 11:42:48.000000000 +0000
-@@ -0,0 +1,234 @@
-+#include "linden_common.h"
-+
-+#include "audioengine_openal.h"
-+#include "listener_openal.h"
-+
-+LLAudioEngine_OpenAL::LLAudioEngine_OpenAL(){
-+}
-+
-+LLAudioEngine_OpenAL::~LLAudioEngine_OpenAL(){
-+}
-+
-+BOOL LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata){
-+ LLAudioEngine::init(num_channels, userdata);
-+
-+ if(!alutInit(NULL, NULL)){
-+ llwarns << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << llendl;
-+ return FALSE;
-+ }
-+
-+ initInternetStream();
-+
-+ llinfos << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl;
-+
-+ llinfos << "LLAudioEngine_OpenAL::init() Speed of sound is: " << alGetFloat(AL_SPEED_OF_SOUND) << llendl;
-+
-+ return TRUE;
-+}
-+
-+void LLAudioEngine_OpenAL::idle(F32 max_decode_time){
-+ LLAudioEngine::idle(max_decode_time);
-+}
-+
-+void LLAudioEngine_OpenAL::allocateListener(){
-+ mListenerp = (LLListener *) new LLListener_OpenAL();
-+ if(!mListenerp){
-+ llwarns << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl;
-+ }
-+}
-+
-+void LLAudioEngine_OpenAL::shutdown(){
-+ LLAudioEngine::shutdown();
-+
-+ if(!alutExit()){
-+ llwarns << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << llendl;
-+ }
-+
-+ llinfos << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl;
-+
-+ delete mListenerp;
-+ mListenerp = NULL;
-+}
-+
-+LLAudioBuffer *LLAudioEngine_OpenAL::createBuffer(){
-+ return new LLAudioBufferOpenAL();
-+}
-+
-+LLAudioChannel *LLAudioEngine_OpenAL::createChannel(){
-+ return new LLAudioChannelOpenAL();
-+}
-+
-+void LLAudioEngine_OpenAL::setInternalGain(F32 gain){
-+ //llinfos << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << llendl;
-+ alListenerf(AL_GAIN, gain);
-+}
-+
-+LLAudioChannelOpenAL::LLAudioChannelOpenAL(){
-+ alGenSources(1, &ALSource);
-+}
-+
-+LLAudioChannelOpenAL::~LLAudioChannelOpenAL(){
-+ cleanup();
-+ alDeleteSources(1, &ALSource);
-+}
-+
-+void LLAudioChannelOpenAL::cleanup(){
-+ alSourceStop(ALSource);
-+ mCurrentBufferp = NULL;
-+}
-+
-+void LLAudioChannelOpenAL::play(){
-+ if(!isPlaying()){
-+ alSourcePlay(ALSource);
-+ getSource()->setPlayedOnce(TRUE);
-+ }
-+}
-+
-+void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp){
-+ play();
-+}
-+
-+BOOL LLAudioChannelOpenAL::isPlaying(){
-+ ALint state;
-+ alGetSourcei(ALSource, AL_SOURCE_STATE, &state);
-+ if(state == AL_PLAYING){
-+ return TRUE;
-+ }
-+ return FALSE;
-+}
-+
-+BOOL LLAudioChannelOpenAL::updateBuffer(){
-+ if (LLAudioChannel::updateBuffer()){
-+ // Base class update returned TRUE, which means that we need to actually
-+ // set up the source for a different buffer.
-+ LLAudioBufferOpenAL *bufferp = (LLAudioBufferOpenAL *)mCurrentSourcep->getCurrentBuffer();
-+ alSourcei(ALSource, AL_BUFFER, bufferp->getBuffer());
-+ alSourcef(ALSource, AL_GAIN, mCurrentSourcep->getGain());
-+ alSourcei(ALSource, AL_LOOPING, mCurrentSourcep->isLoop() ? AL_TRUE : AL_FALSE);
-+ }
-+
-+ return TRUE;
-+}
-+
-+void LLAudioChannelOpenAL::update3DPosition(){
-+ if(!mCurrentSourcep){
-+ return;
-+ }
-+ if (mCurrentSourcep->isAmbient()){
-+ alSource3f(ALSource, AL_POSITION, 0.0, 0.0, 0.0);
-+ alSource3f(ALSource, AL_VELOCITY, 0.0, 0.0, 0.0);
-+ //alSource3f(ALSource, AL_DIRECTION, 0.0, 0.0, 0.0);
-+ alSourcef (ALSource, AL_ROLLOFF_FACTOR, 0.0);
-+ alSourcei (ALSource, AL_SOURCE_RELATIVE, AL_TRUE);
-+ }else{
-+ LLVector3 float_pos;
-+ float_pos.setVec(mCurrentSourcep->getPositionGlobal());
-+ alSourcefv(ALSource, AL_POSITION, float_pos.mV);
-+ //llinfos << "LLAudioChannelOpenAL::update3DPosition() Velocity: " << mCurrentSourcep->getVelocity() << llendl;
-+ alSourcefv(ALSource, AL_VELOCITY, mCurrentSourcep->getVelocity().mV);
-+ //alSource3f(ALSource, AL_DIRECTION, 0.0, 0.0, 0.0);
-+ alSourcef (ALSource, AL_ROLLOFF_FACTOR, 1.0);
-+ alSourcei (ALSource, AL_SOURCE_RELATIVE, AL_FALSE);
-+ }
-+ //llinfos << "LLAudioChannelOpenAL::update3DPosition() Gain: " << mCurrentSourcep->getGain() << llendl;
-+ alSourcef(ALSource, AL_GAIN, mCurrentSourcep->getGain());
-+}
-+
-+LLAudioBufferOpenAL::LLAudioBufferOpenAL(){
-+ ALBuffer = AL_NONE;
-+}
-+
-+LLAudioBufferOpenAL::~LLAudioBufferOpenAL(){
-+ cleanup();
-+}
-+
-+void LLAudioBufferOpenAL::cleanup(){
-+ if(ALBuffer != AL_NONE){
-+ alDeleteBuffers(1, &ALBuffer);
-+ }
-+}
-+
-+BOOL LLAudioBufferOpenAL::loadWAV(const char *filename){
-+ cleanup();
-+ ALBuffer = alutCreateBufferFromFile(filename);
-+ if(ALBuffer == AL_NONE){
-+ alutGetError();
-+ //llwarns << "LLAudioBufferOpenAL::loadWAV() Error loading " << filename
-+ // << " " << alutGetErrorString(error) << llendl;
-+ return FALSE;
-+ }
-+
-+ return TRUE;
-+}
-+
-+U32 LLAudioBufferOpenAL::getLength(){
-+ if(ALBuffer == AL_NONE){
-+ return 0;
-+ }
-+ ALint length;
-+ alGetBufferi(ALBuffer, AL_SIZE, &length);
-+ return length >> 2;
-+}
-+
-+// ------------
-+
-+void LLAudioEngine_OpenAL::initWind(){
-+}
-+
-+void LLAudioEngine_OpenAL::cleanupWind(){
-+}
-+
-+void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude){
-+ //llinfos << "LLAudioEngine_OpenAL::updateWind() Direction: "
-+ // << wind_vec << " Altitude: " << camera_altitude << llendl;
-+}
-+
-+// ------------
-+
-+void LLAudioEngine_OpenAL::initInternetStream(){
-+ mInternetStreamURL = NULL;
-+}
-+
-+void LLAudioEngine_OpenAL::startInternetStream(const char* url){
-+ if(mInternetStreamURL){
-+ delete mInternetStreamURL;
-+ }
-+
-+ if (url) {
-+ llinfos << "LLAudioEngine_OpenAL::startInternetStream() Starting internet stream: " << url << llendl;
-+ mInternetStreamURL = new std::string(url);
-+ }else{
-+ llinfos << "LLAudioEngine_OpenAL::startInternetStream() Set internet stream to null" << llendl;
-+ mInternetStreamURL = NULL;
-+ }
-+}
-+
-+void LLAudioEngine_OpenAL::updateInternetStream(){
-+}
-+
-+void LLAudioEngine_OpenAL::stopInternetStream(){
-+}
-+
-+void LLAudioEngine_OpenAL::pauseInternetStream(int pause){
-+}
-+
-+int LLAudioEngine_OpenAL::isInternetStreamPlaying(){
-+ if(mInternetStreamURL){
-+ return 2; // "Paused"
-+ }else{
-+ return 0;
-+ }
-+}
-+
-+void LLAudioEngine_OpenAL::getInternetStreamInfo(char* artist_out, char* title_out){
-+}
-+
-+void LLAudioEngine_OpenAL::setInternetStreamGain(F32 vol){
-+}
-+
-+const char* LLAudioEngine_OpenAL::getInternetStreamURL(){
-+ if(mInternetStreamURL){
-+ return mInternetStreamURL->c_str();
-+ }
-+ return "";
-+}
-Index: ./indra/llaudio/audioengine_openal.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ ./indra/llaudio/audioengine_openal.h 2008-01-23 11:42:48.000000000 +0000
-@@ -0,0 +1,78 @@
-+#ifndef LL_AUDIOENGINE_OpenAL_H
-+#define LL_AUDIOENGINE_OpenAL_H
-+
-+#include <string>
-+
-+#include "audioengine.h"
-+#include "listener_openal.h"
-+
-+class LLAudioEngine_OpenAL : public LLAudioEngine{
-+ public:
-+ LLAudioEngine_OpenAL();
-+ virtual ~LLAudioEngine_OpenAL();
-+
-+ virtual BOOL init(const S32 num_channels, void *user_data);
-+ virtual void allocateListener();
-+
-+ virtual void shutdown();
-+
-+ virtual void idle(F32 max_decode_time = 0.f);
-+
-+ void setInternalGain(F32 gain);
-+
-+ LLAudioBuffer* createBuffer();
-+ LLAudioChannel* createChannel();
-+
-+ // Internet stream methods
-+ virtual void initInternetStream();
-+ virtual void startInternetStream(const char* url);
-+ virtual void stopInternetStream();
-+ virtual void updateInternetStream();
-+ virtual void pauseInternetStream(int pause);
-+ virtual int isInternetStreamPlaying();
-+ virtual void getInternetStreamInfo(char* artist, char* title);
-+ virtual void setInternetStreamGain(F32 vol);
-+ virtual const char* getInternetStreamURL();
-+
-+ void initWind();
-+ void cleanupWind();
-+ void updateWind(LLVector3 direction, F32 camera_altitude);
-+
-+ protected:
-+ std::string* mInternetStreamURL;
-+};
-+
-+class LLAudioChannelOpenAL : public LLAudioChannel{
-+ public:
-+ LLAudioChannelOpenAL();
-+ virtual ~LLAudioChannelOpenAL();
-+ protected:
-+ void play();
-+ void playSynced(LLAudioChannel *channelp);
-+ void cleanup();
-+ BOOL isPlaying();
-+
-+ BOOL updateBuffer();
-+ void update3DPosition();
-+ void updateLoop(){};
-+
-+ ALuint ALSource;
-+};
-+
-+class LLAudioBufferOpenAL : public LLAudioBuffer{
-+ public:
-+ LLAudioBufferOpenAL();
-+ virtual ~LLAudioBufferOpenAL();
-+
-+ BOOL loadWAV(const char *filename);
-+ U32 getLength();
-+
-+ friend class LLAudioChannelOpenAL;
-+ protected:
-+ void cleanup();
-+ ALuint getBuffer(){return ALBuffer;}
-+ ALuint ALBuffer;
-+};
-+
-+#endif
-+
-Index: ./indra/llaudio/files.lst
-===================================================================
---- ./indra/llaudio/files.lst 2008-01-23 11:41:35.000000000 +0000
-+++ ./indra/llaudio/files.lst 2008-01-23 11:41:51.000000000 +0000
-@@ -1,7 +1,7 @@
- llaudio/audioengine.cpp
--llaudio/audioengine_fmod.cpp
-+llaudio/audioengine_openal.cpp
- llaudio/listener.cpp
--llaudio/listener_fmod.cpp
-+llaudio/listener_openal.cpp
- llaudio/llaudiodecodemgr.cpp
- llaudio/vorbisdecode.cpp
- llaudio/vorbisencode.cpp
-Index: ./indra/llaudio/listener_openal.cpp
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ ./indra/llaudio/listener_openal.cpp 2008-01-23 11:41:51.000000000 +0000
-@@ -0,0 +1,65 @@
-+#include "linden_common.h"
-+#include "audioengine.h"
-+
-+#include "listener_openal.h"
-+
-+LLListener_OpenAL::LLListener_OpenAL(){
-+ init();
-+}
-+
-+LLListener_OpenAL::~LLListener_OpenAL(){
-+}
-+
-+void LLListener_OpenAL::translate(LLVector3 offset){
-+ LLListener::translate(offset);
-+ llinfos << "LLListener_OpenAL::translate() : " << offset << llendl;
-+}
-+
-+void LLListener_OpenAL::setPosition(LLVector3 pos){
-+ LLListener::setPosition(pos);
-+ //llinfos << "LLListener_OpenAL::setPosition() : " << pos << llendl;
-+}
-+
-+void LLListener_OpenAL::setVelocity(LLVector3 vel){
-+ LLListener::setVelocity(vel);
-+}
-+
-+void LLListener_OpenAL::orient(LLVector3 up, LLVector3 at){
-+ LLListener::orient(up, at);
-+ //llinfos << "LLListener_OpenAL::orient() up: " << up << " at: " << at << llendl;
-+}
-+
-+void LLListener_OpenAL::commitDeferredChanges(){
-+ ALfloat orientation[6];
-+ orientation[0] = mListenAt.mV[0];
-+ orientation[1] = mListenAt.mV[1];
-+ orientation[2] = mListenAt.mV[2];
-+ orientation[3] = mListenUp.mV[0];
-+ orientation[4] = mListenUp.mV[1];
-+ orientation[5] = mListenUp.mV[2];
-+
-+ // Why is this backwards?
-+ ALfloat velocity[3];
-+ velocity[0] = -mVelocity.mV[0];
-+ velocity[1] = -mVelocity.mV[1];
-+ velocity[2] = -mVelocity.mV[2];
-+
-+ alListenerfv(AL_ORIENTATION, orientation);
-+ alListenerfv(AL_POSITION, mPosition.mV);
-+ alListenerfv(AL_VELOCITY, velocity);
-+}
-+
-+void LLListener_OpenAL::setDopplerFactor(F32 factor){
-+ // Effect is way too strong by default, scale it down here.
-+ // Scaling the speed of sound up causes crashes.
-+ factor *= 0.01f;
-+ //llinfos << "LLListener_OpenAL::setDopplerFactor() : " << factor << llendl;
-+ alDopplerFactor(factor);
-+}
-+
-+F32 LLListener_OpenAL::getDopplerFactor(){
-+ ALfloat factor=1.0;
-+ alDopplerFactor(factor);
-+ llinfos << "LLListener_OpenAL::getDopplerFactor() : " << factor << llendl;
-+ return factor;
-+}
-Index: ./indra/llaudio/llaudiodecodemgr.cpp
-===================================================================
---- ./indra/llaudio/llaudiodecodemgr.cpp 2008-01-23 11:41:35.000000000 +0000
-+++ ./indra/llaudio/llaudiodecodemgr.cpp 2008-01-23 11:41:51.000000000 +0000
-@@ -374,16 +374,15 @@
-
- // write "data" chunk length, in little-endian format
- S32 data_length = mWAVBuffer.size() - WAV_HEADER_SIZE;
-- mWAVBuffer[40] = (data_length) & 0x000000FF;
-- mWAVBuffer[41] = (data_length >> 8) & 0x000000FF;
-- mWAVBuffer[42] = (data_length >> 16) & 0x000000FF;
-- mWAVBuffer[43] = (data_length >> 24) & 0x000000FF;
-+ mWAVBuffer[40] = (data_length - 8) & 0x000000FF;
-+ mWAVBuffer[41] = ((data_length - 8)>> 8) & 0x000000FF;
-+ mWAVBuffer[42] = ((data_length - 8)>> 16) & 0x000000FF;
-+ mWAVBuffer[43] = ((data_length - 8)>> 24) & 0x000000FF;
- // write overall "RIFF" length, in little-endian format
-- data_length += 36;
-- mWAVBuffer[4] = (data_length) & 0x000000FF;
-- mWAVBuffer[5] = (data_length >> 8) & 0x000000FF;
-- mWAVBuffer[6] = (data_length >> 16) & 0x000000FF;
-- mWAVBuffer[7] = (data_length >> 24) & 0x000000FF;
-+ mWAVBuffer[4] = (data_length + 28) & 0x000000FF;
-+ mWAVBuffer[5] = ((data_length + 28) >> 8) & 0x000000FF;
-+ mWAVBuffer[6] = ((data_length + 28) >> 16) & 0x000000FF;
-+ mWAVBuffer[7] = ((data_length + 28) >> 24) & 0x000000FF;
-
- //
- // FUCK!!! Vorbis encode/decode messes up loop point transitions (pop)
-@@ -395,7 +394,7 @@
- S32 fade_length;
- char pcmout[4096]; /*Flawfinder: ignore*/
-
-- fade_length = llmin((S32)128,(S32)(data_length-36)/8);
-+ fade_length = llmin((S32)128,(S32)(data_length)/8);
- if((S32)mWAVBuffer.size() >= (WAV_HEADER_SIZE + 2* fade_length))
- {
- memcpy(pcmout, &mWAVBuffer[WAV_HEADER_SIZE], (2 * fade_length)); /*Flawfinder: ignore*/
-@@ -435,7 +434,7 @@
- }
- }
-
-- if (36 == data_length)
-+ if (0 == data_length)
- {
- llwarns << "BAD Vorbis decode in finishDecode!" << llendl;
- mValid = FALSE;
-@@ -443,7 +442,7 @@
- }
- #if !defined(USE_WAV_VFILE)
- mBytesRead = -1;
-- mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, data_length,
-+ mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, data_length + 36,
- new WriteResponder(this));
- #endif
- }
-Index: ./indra/newview/llappviewer.cpp
-===================================================================
---- ./indra/newview/llappviewer.cpp 2008-01-23 11:41:35.000000000 +0000
-+++ ./indra/newview/llappviewer.cpp 2008-01-23 11:41:51.000000000 +0000
-@@ -1600,16 +1592,10 @@
-
- llinfos << "Global stuff deleted" << llendflush;
-
--#if !LL_RELEASE_FOR_DOWNLOAD
- if (gAudiop)
- {
- gAudiop->shutdown();
- }
--#else
-- // This hack exists because fmod likes to occasionally hang forever
-- // when shutting down for no apparent reason.
-- llwarns << "Hack, skipping audio engine cleanup" << llendflush;
--#endif
-
- llinfos << "Cleaning up feature manager" << llendflush;
- delete gFeatureManagerp;
-Index: ./indra/newview/llstartup.cpp
-===================================================================
---- ./indra/newview/llstartup.cpp 2008-01-23 11:41:35.000000000 +0000
-+++ ./indra/newview/llstartup.cpp 2008-01-23 11:41:51.000000000 +0000
-@@ -41,9 +41,7 @@
-
- #include "audioengine.h"
-
--#if LL_FMOD
--#include "audioengine_fmod.h"
--#endif
-+#include "audioengine_openal.h"
-
- #include "audiosettings.h"
- #include "llares.h"
-@@ -605,11 +603,7 @@
-
- if (gUseAudio)
- {
--#if LL_FMOD
-- gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD();
--#else
-- gAudiop = NULL;
--#endif
-+ gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL();
-
- if (gAudiop)
- {
-Index: ./indra/SConstruct
-===================================================================
---- ./indra/SConstruct 2008-01-23 11:41:48.000000000 +0000
-+++ ./indra/SConstruct 2008-01-23 11:42:40.000000000 +0000
-@@ -145,6 +145,8 @@
- 'vorbis',
- 'vorbisenc',
- 'vorbisfile',
-+ 'openal',
-+ 'freealut',
- ]
-
- standalone_net_pkgs = [
---- /dev/null 2008-01-31 08:44:17.136037029 +0000
-+++ ./indra/llaudio/listener_openal.h 2008-01-31 15:47:12.000000000 +0000
-@@ -0,0 +1,63 @@
-+/**
-+ * @file listener_openal.h
-+ * @brief Description of LISTENER class abstracting the audio support
-+ * as an OpenAL implementation
-+ *
-+ * $LicenseInfo:firstyear=2000&license=viewergpl$
-+ *
-+ * Copyright (c) 2000-2008, Linden Research, Inc.
-+ *
-+ * Second Life Viewer Source Code
-+ * The source code in this file ("Source Code") is provided by Linden Lab
-+ * to you under the terms of the GNU General Public License, version 2.0
-+ * ("GPL"), unless you have obtained a separate licensing agreement
-+ * ("Other License"), formally executed by you and Linden Lab. Terms of
-+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
-+ * online at http://secondlife.com/developers/opensource/gplv2
-+ *
-+ * There are special exceptions to the terms and conditions of the GPL as
-+ * it is applied to this Source Code. View the full text of the exception
-+ * in the file doc/FLOSS-exception.txt in this software distribution, or
-+ * online at http://secondlife.com/developers/opensource/flossexception
-+ *
-+ * By copying, modifying or distributing this software, you acknowledge
-+ * that you have read and understood your obligations described above,
-+ * and agree to abide by those obligations.
-+ *
-+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
-+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
-+ * COMPLETENESS OR PERFORMANCE.
-+ * $/LicenseInfo$
-+ */
-+
-+#ifndef LL_LISTENER_OPENAL_H
-+#define LL_LISTENER_OPENAL_H
-+
-+#include "listener.h"
-+
-+#include "AL/al.h"
-+#include "AL/alut.h"
-+
-+class LLListener_OpenAL : public LLListener
-+{
-+ private:
-+ protected:
-+ public:
-+
-+ private:
-+ protected:
-+ public:
-+ LLListener_OpenAL();
-+ virtual ~LLListener_OpenAL();
-+
-+ virtual void translate(LLVector3 offset);
-+ virtual void setPosition(LLVector3 pos);
-+ virtual void setVelocity(LLVector3 vel);
-+ virtual void orient(LLVector3 up, LLVector3 at);
-+ virtual void commitDeferredChanges();
-+
-+ virtual void setDopplerFactor(F32 factor);
-+ virtual F32 getDopplerFactor();
-+};
-+
-+#endif
diff --git a/debian/patches/oldpatch/stop_spamming_my_logs_with_unknown_havok4_stats.dpatch b/debian/patches/oldpatch/stop_spamming_my_logs_with_unknown_havok4_stats.dpatch
deleted file mode 100644
index 43480a6..0000000
--- a/debian/patches/oldpatch/stop_spamming_my_logs_with_unknown_havok4_stats.dpatch
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## stop spamming my logs with unknown havok4 stats.dpatch by <robin at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/newview/llviewermessage.cpp
-===================================================================
---- ./indra/newview/llviewermessage.cpp (revision 178)
-+++ ./indra/newview/llviewermessage.cpp (working copy)
-@@ -3512,6 +3512,10 @@
- case LL_SIM_STAT_TOTAL_UNACKED_BYTES:
- gViewerStats->mSimTotalUnackedBytes.addValue(stat_value / 1024.f);
- break;
-+ case 25:
-+ case 26:
-+ //stop spamming my logs with unknown havok4 stats!
-+ break;
- default:
- llwarns << "Unknown stat id" << stat_id << llendl;
- }
diff --git a/debian/patches/openal_1.20.0.dpatch b/debian/patches/openal_1.20.0.dpatch
deleted file mode 100644
index d087f67..0000000
--- a/debian/patches/openal_1.20.0.dpatch
+++ /dev/null
@@ -1,545 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## update openal 1.20.0.dpatch by <root at debian>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/newview/llappviewer.cpp
-===================================================================
---- ./indra/newview/llappviewer.cpp (revision 295)
-+++ ./indra/newview/llappviewer.cpp (working copy)
-@@ -1135,16 +1135,10 @@
-
- llinfos << "Global stuff deleted" << llendflush;
-
--#if !LL_RELEASE_FOR_DOWNLOAD
- if (gAudiop)
- {
- gAudiop->shutdown();
- }
--#else
-- // This hack exists because fmod likes to occasionally hang forever
-- // when shutting down for no apparent reason.
-- llwarns << "Hack, skipping audio engine cleanup" << llendflush;
--#endif
-
- // Note: this is where LLFeatureManager::getInstance()-> used to be deleted.
-
-Index: ./indra/newview/llstartup.cpp
-===================================================================
---- ./indra/newview/llstartup.cpp (revision 295)
-+++ ./indra/newview/llstartup.cpp (working copy)
-@@ -41,9 +41,7 @@
-
- #include "audioengine.h"
-
--#if LL_FMOD
--#include "audioengine_fmod.h"
--#endif
-+#include "audioengine_openal.h"
-
- #include "llares.h"
- #include "llcachename.h"
-@@ -539,11 +537,7 @@
-
- if (FALSE == gSavedSettings.getBOOL("NoAudio"))
- {
--#if LL_FMOD
-- gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD();
--#else
-- gAudiop = NULL;
--#endif
-+ gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL();
-
- if (gAudiop)
- {
-Index: ./indra/llaudio/llaudiodecodemgr.cpp
-===================================================================
---- ./indra/llaudio/llaudiodecodemgr.cpp (revision 294)
-+++ ./indra/llaudio/llaudiodecodemgr.cpp (working copy)
-@@ -443,7 +443,7 @@
- }
- #if !defined(USE_WAV_VFILE)
- mBytesRead = -1;
-- mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, data_length,
-+ mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(),
- new WriteResponder(this));
- #endif
- }
-Index: ./indra/llaudio/files.lst
-===================================================================
---- ./indra/llaudio/files.lst (revision 294)
-+++ ./indra/llaudio/files.lst (working copy)
-@@ -1,7 +1,7 @@
- llaudio/audioengine.cpp
--llaudio/audioengine_fmod.cpp
-+llaudio/audioengine_openal.cpp
- llaudio/listener.cpp
--llaudio/listener_fmod.cpp
-+llaudio/listener_openal.cpp
- llaudio/llaudiodecodemgr.cpp
- llaudio/vorbisdecode.cpp
- llaudio/vorbisencode.cpp
-Index: ./indra/llaudio/audioengine.cpp
-===================================================================
---- ./indra/llaudio/audioengine.cpp (revision 294)
-+++ ./indra/llaudio/audioengine.cpp (working copy)
-@@ -1323,7 +1323,7 @@
- BOOL LLAudioSource::isDone()
- {
- const F32 MAX_AGE = 60.f;
-- const F32 MAX_UNPLAYED_AGE = 15.f;
-+ const F32 MAX_UNPLAYED_AGE = 30.f;
- if (isLoop())
- {
- // Looped sources never die on their own.
-Index: ./indra/llaudio/listener_openal.h
-===================================================================
---- ./indra/llaudio/listener_openal.h (revision 296)
-+++ ./indra/llaudio/listener_openal.h (working copy)
-@@ -13,12 +13,12 @@
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
-- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
-+ * online at http://secondlife.com/developers/opensource/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
-- * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
-+ * online at http://secondlife.com/developers/opensource/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
-@@ -54,7 +54,10 @@
- virtual void setPosition(LLVector3 pos);
- virtual void setVelocity(LLVector3 vel);
- virtual void orient(LLVector3 up, LLVector3 at);
-+ virtual void commitDeferredChanges();
-+
-+ virtual void setDopplerFactor(F32 factor);
-+ virtual F32 getDopplerFactor();
- };
-
- #endif
--
-Index: ./indra/llaudio/audioengine_fmod.cpp
-===================================================================
---- ./indra/llaudio/audioengine_fmod.cpp (revision 294)
-+++ ./indra/llaudio/audioengine_fmod.cpp (working copy)
-@@ -288,6 +288,13 @@
-
- void LLAudioEngine_FMOD::shutdown()
- {
-+#if LL_RELEASE_FOR_DOWNLOAD
-+ // This hack exists because fmod likes to occasionally hang forever
-+ // when shutting down for no apparent reason.
-+ llwarns << "Hack, skipping audio engine cleanup" << llendflush;
-+ return;
-+#endif
-+
- if (gWindDSP)
- {
- FSOUND_DSP_SetActive(gWindDSP,FALSE);
-Index: ./indra/SConstruct
-===================================================================
---- ./indra/SConstruct (revision 295)
-+++ ./indra/SConstruct (working copy)
-@@ -151,6 +151,8 @@
- 'vorbis',
- 'vorbisenc',
- 'vorbisfile',
-+ 'openal',
-+ 'freealut',
- ]
-
- standalone_net_pkgs = [
---- /dev/null 2008-04-12 15:13:23.716010378 +0100
-+++ ./indra/llaudio/listener_openal.cpp 2008-04-13 09:44:39.000000000 +0100
-@@ -0,0 +1,65 @@
-+#include "linden_common.h"
-+#include "audioengine.h"
-+
-+#include "listener_openal.h"
-+
-+LLListener_OpenAL::LLListener_OpenAL(){
-+ init();
-+}
-+
-+LLListener_OpenAL::~LLListener_OpenAL(){
-+}
-+
-+void LLListener_OpenAL::translate(LLVector3 offset){
-+ LLListener::translate(offset);
-+ llinfos << "LLListener_OpenAL::translate() : " << offset << llendl;
-+}
-+
-+void LLListener_OpenAL::setPosition(LLVector3 pos){
-+ LLListener::setPosition(pos);
-+ //llinfos << "LLListener_OpenAL::setPosition() : " << pos << llendl;
-+}
-+
-+void LLListener_OpenAL::setVelocity(LLVector3 vel){
-+ LLListener::setVelocity(vel);
-+}
-+
-+void LLListener_OpenAL::orient(LLVector3 up, LLVector3 at){
-+ LLListener::orient(up, at);
-+ //llinfos << "LLListener_OpenAL::orient() up: " << up << " at: " << at << llendl;
-+}
-+
-+void LLListener_OpenAL::commitDeferredChanges(){
-+ ALfloat orientation[6];
-+ orientation[0] = mListenAt.mV[0];
-+ orientation[1] = mListenAt.mV[1];
-+ orientation[2] = mListenAt.mV[2];
-+ orientation[3] = mListenUp.mV[0];
-+ orientation[4] = mListenUp.mV[1];
-+ orientation[5] = mListenUp.mV[2];
-+
-+ // Why is this backwards?
-+ ALfloat velocity[3];
-+ velocity[0] = -mVelocity.mV[0];
-+ velocity[1] = -mVelocity.mV[1];
-+ velocity[2] = -mVelocity.mV[2];
-+
-+ alListenerfv(AL_ORIENTATION, orientation);
-+ alListenerfv(AL_POSITION, mPosition.mV);
-+ alListenerfv(AL_VELOCITY, velocity);
-+}
-+
-+void LLListener_OpenAL::setDopplerFactor(F32 factor){
-+ // Effect is way too strong by default, scale it down here.
-+ // Scaling the speed of sound up causes crashes.
-+ factor *= 0.01f;
-+ //llinfos << "LLListener_OpenAL::setDopplerFactor() : " << factor << llendl;
-+ alDopplerFactor(factor);
-+}
-+
-+F32 LLListener_OpenAL::getDopplerFactor(){
-+ ALfloat factor=1.0;
-+ alDopplerFactor(factor);
-+ llinfos << "LLListener_OpenAL::getDopplerFactor() : " << factor << llendl;
-+ return factor;
-+}
---- /dev/null 2008-04-12 15:13:23.716010378 +0100
-+++ ./indra/llaudio/audioengine_openal.cpp 2008-04-13 09:44:39.000000000 +0100
-@@ -0,0 +1,234 @@
-+#include "linden_common.h"
-+
-+#include "audioengine_openal.h"
-+#include "listener_openal.h"
-+
-+LLAudioEngine_OpenAL::LLAudioEngine_OpenAL(){
-+}
-+
-+LLAudioEngine_OpenAL::~LLAudioEngine_OpenAL(){
-+}
-+
-+BOOL LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata){
-+ LLAudioEngine::init(num_channels, userdata);
-+
-+ if(!alutInit(NULL, NULL)){
-+ llwarns << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << llendl;
-+ return FALSE;
-+ }
-+
-+ initInternetStream();
-+
-+ llinfos << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl;
-+
-+ llinfos << "LLAudioEngine_OpenAL::init() Speed of sound is: " << alGetFloat(AL_SPEED_OF_SOUND) << llendl;
-+
-+ return TRUE;
-+}
-+
-+void LLAudioEngine_OpenAL::idle(F32 max_decode_time){
-+ LLAudioEngine::idle(max_decode_time);
-+}
-+
-+void LLAudioEngine_OpenAL::allocateListener(){
-+ mListenerp = (LLListener *) new LLListener_OpenAL();
-+ if(!mListenerp){
-+ llwarns << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl;
-+ }
-+}
-+
-+void LLAudioEngine_OpenAL::shutdown(){
-+ LLAudioEngine::shutdown();
-+
-+ if(!alutExit()){
-+ llwarns << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << llendl;
-+ }
-+
-+ llinfos << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl;
-+
-+ delete mListenerp;
-+ mListenerp = NULL;
-+}
-+
-+LLAudioBuffer *LLAudioEngine_OpenAL::createBuffer(){
-+ return new LLAudioBufferOpenAL();
-+}
-+
-+LLAudioChannel *LLAudioEngine_OpenAL::createChannel(){
-+ return new LLAudioChannelOpenAL();
-+}
-+
-+void LLAudioEngine_OpenAL::setInternalGain(F32 gain){
-+ //llinfos << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << llendl;
-+ alListenerf(AL_GAIN, gain);
-+}
-+
-+LLAudioChannelOpenAL::LLAudioChannelOpenAL(){
-+ alGenSources(1, &ALSource);
-+}
-+
-+LLAudioChannelOpenAL::~LLAudioChannelOpenAL(){
-+ cleanup();
-+ alDeleteSources(1, &ALSource);
-+}
-+
-+void LLAudioChannelOpenAL::cleanup(){
-+ alSourceStop(ALSource);
-+ mCurrentBufferp = NULL;
-+}
-+
-+void LLAudioChannelOpenAL::play(){
-+ if(!isPlaying()){
-+ alSourcePlay(ALSource);
-+ getSource()->setPlayedOnce(TRUE);
-+ }
-+}
-+
-+void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp){
-+ play();
-+}
-+
-+BOOL LLAudioChannelOpenAL::isPlaying(){
-+ ALint state;
-+ alGetSourcei(ALSource, AL_SOURCE_STATE, &state);
-+ if(state == AL_PLAYING){
-+ return TRUE;
-+ }
-+ return FALSE;
-+}
-+
-+BOOL LLAudioChannelOpenAL::updateBuffer(){
-+ if (LLAudioChannel::updateBuffer()){
-+ // Base class update returned TRUE, which means that we need to actually
-+ // set up the source for a different buffer.
-+ LLAudioBufferOpenAL *bufferp = (LLAudioBufferOpenAL *)mCurrentSourcep->getCurrentBuffer();
-+ alSourcei(ALSource, AL_BUFFER, bufferp->getBuffer());
-+ alSourcef(ALSource, AL_GAIN, mCurrentSourcep->getGain());
-+ alSourcei(ALSource, AL_LOOPING, mCurrentSourcep->isLoop() ? AL_TRUE : AL_FALSE);
-+ }
-+
-+ return TRUE;
-+}
-+
-+void LLAudioChannelOpenAL::update3DPosition(){
-+ if(!mCurrentSourcep){
-+ return;
-+ }
-+ if (mCurrentSourcep->isAmbient()){
-+ alSource3f(ALSource, AL_POSITION, 0.0, 0.0, 0.0);
-+ alSource3f(ALSource, AL_VELOCITY, 0.0, 0.0, 0.0);
-+ //alSource3f(ALSource, AL_DIRECTION, 0.0, 0.0, 0.0);
-+ alSourcef (ALSource, AL_ROLLOFF_FACTOR, 0.0);
-+ alSourcei (ALSource, AL_SOURCE_RELATIVE, AL_TRUE);
-+ }else{
-+ LLVector3 float_pos;
-+ float_pos.setVec(mCurrentSourcep->getPositionGlobal());
-+ alSourcefv(ALSource, AL_POSITION, float_pos.mV);
-+ //llinfos << "LLAudioChannelOpenAL::update3DPosition() Velocity: " << mCurrentSourcep->getVelocity() << llendl;
-+ alSourcefv(ALSource, AL_VELOCITY, mCurrentSourcep->getVelocity().mV);
-+ //alSource3f(ALSource, AL_DIRECTION, 0.0, 0.0, 0.0);
-+ alSourcef (ALSource, AL_ROLLOFF_FACTOR, 1.0);
-+ alSourcei (ALSource, AL_SOURCE_RELATIVE, AL_FALSE);
-+ }
-+ //llinfos << "LLAudioChannelOpenAL::update3DPosition() Gain: " << mCurrentSourcep->getGain() << llendl;
-+ alSourcef(ALSource, AL_GAIN, mCurrentSourcep->getGain());
-+}
-+
-+LLAudioBufferOpenAL::LLAudioBufferOpenAL(){
-+ ALBuffer = AL_NONE;
-+}
-+
-+LLAudioBufferOpenAL::~LLAudioBufferOpenAL(){
-+ cleanup();
-+}
-+
-+void LLAudioBufferOpenAL::cleanup(){
-+ if(ALBuffer != AL_NONE){
-+ alDeleteBuffers(1, &ALBuffer);
-+ }
-+}
-+
-+BOOL LLAudioBufferOpenAL::loadWAV(const char *filename){
-+ cleanup();
-+ ALBuffer = alutCreateBufferFromFile(filename);
-+ if(ALBuffer == AL_NONE){
-+ alutGetError();
-+ //llwarns << "LLAudioBufferOpenAL::loadWAV() Error loading " << filename
-+ // << " " << alutGetErrorString(error) << llendl;
-+ return FALSE;
-+ }
-+
-+ return TRUE;
-+}
-+
-+U32 LLAudioBufferOpenAL::getLength(){
-+ if(ALBuffer == AL_NONE){
-+ return 0;
-+ }
-+ ALint length;
-+ alGetBufferi(ALBuffer, AL_SIZE, &length);
-+ return length >> 2;
-+}
-+
-+// ------------
-+
-+void LLAudioEngine_OpenAL::initWind(){
-+}
-+
-+void LLAudioEngine_OpenAL::cleanupWind(){
-+}
-+
-+void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude){
-+ //llinfos << "LLAudioEngine_OpenAL::updateWind() Direction: "
-+ // << wind_vec << " Altitude: " << camera_altitude << llendl;
-+}
-+
-+// ------------
-+
-+void LLAudioEngine_OpenAL::initInternetStream(){
-+ mInternetStreamURL = NULL;
-+}
-+
-+void LLAudioEngine_OpenAL::startInternetStream(const char* url){
-+ if(mInternetStreamURL){
-+ delete mInternetStreamURL;
-+ }
-+
-+ if (url) {
-+ llinfos << "LLAudioEngine_OpenAL::startInternetStream() Starting internet stream: " << url << llendl;
-+ mInternetStreamURL = new std::string(url);
-+ }else{
-+ llinfos << "LLAudioEngine_OpenAL::startInternetStream() Set internet stream to null" << llendl;
-+ mInternetStreamURL = NULL;
-+ }
-+}
-+
-+void LLAudioEngine_OpenAL::updateInternetStream(){
-+}
-+
-+void LLAudioEngine_OpenAL::stopInternetStream(){
-+}
-+
-+void LLAudioEngine_OpenAL::pauseInternetStream(int pause){
-+}
-+
-+int LLAudioEngine_OpenAL::isInternetStreamPlaying(){
-+ if(mInternetStreamURL){
-+ return 2; // "Paused"
-+ }else{
-+ return 0;
-+ }
-+}
-+
-+void LLAudioEngine_OpenAL::getInternetStreamInfo(char* artist_out, char* title_out){
-+}
-+
-+void LLAudioEngine_OpenAL::setInternetStreamGain(F32 vol){
-+}
-+
-+const char* LLAudioEngine_OpenAL::getInternetStreamURL(){
-+ if(mInternetStreamURL){
-+ return mInternetStreamURL->c_str();
-+ }
-+ return "";
-+}
---- /dev/null 2008-04-12 15:13:23.716010378 +0100
-+++ ./indra/llaudio/audioengine_openal.h 2008-04-13 09:44:39.000000000 +0100
-@@ -0,0 +1,78 @@
-+#ifndef LL_AUDIOENGINE_OpenAL_H
-+#define LL_AUDIOENGINE_OpenAL_H
-+
-+#include <string>
-+
-+#include "audioengine.h"
-+#include "listener_openal.h"
-+
-+class LLAudioEngine_OpenAL : public LLAudioEngine{
-+ public:
-+ LLAudioEngine_OpenAL();
-+ virtual ~LLAudioEngine_OpenAL();
-+
-+ virtual BOOL init(const S32 num_channels, void *user_data);
-+ virtual void allocateListener();
-+
-+ virtual void shutdown();
-+
-+ virtual void idle(F32 max_decode_time = 0.f);
-+
-+ void setInternalGain(F32 gain);
-+
-+ LLAudioBuffer* createBuffer();
-+ LLAudioChannel* createChannel();
-+
-+ // Internet stream methods
-+ virtual void initInternetStream();
-+ virtual void startInternetStream(const char* url);
-+ virtual void stopInternetStream();
-+ virtual void updateInternetStream();
-+ virtual void pauseInternetStream(int pause);
-+ virtual int isInternetStreamPlaying();
-+ virtual void getInternetStreamInfo(char* artist, char* title);
-+ virtual void setInternetStreamGain(F32 vol);
-+ virtual const char* getInternetStreamURL();
-+
-+ void initWind();
-+ void cleanupWind();
-+ void updateWind(LLVector3 direction, F32 camera_altitude);
-+
-+ protected:
-+ std::string* mInternetStreamURL;
-+};
-+
-+class LLAudioChannelOpenAL : public LLAudioChannel{
-+ public:
-+ LLAudioChannelOpenAL();
-+ virtual ~LLAudioChannelOpenAL();
-+ protected:
-+ void play();
-+ void playSynced(LLAudioChannel *channelp);
-+ void cleanup();
-+ BOOL isPlaying();
-+
-+ BOOL updateBuffer();
-+ void update3DPosition();
-+ void updateLoop(){};
-+
-+ ALuint ALSource;
-+};
-+
-+class LLAudioBufferOpenAL : public LLAudioBuffer{
-+ public:
-+ LLAudioBufferOpenAL();
-+ virtual ~LLAudioBufferOpenAL();
-+
-+ BOOL loadWAV(const char *filename);
-+ U32 getLength();
-+
-+ friend class LLAudioChannelOpenAL;
-+ protected:
-+ void cleanup();
-+ ALuint getBuffer(){return ALBuffer;}
-+ ALuint ALBuffer;
-+};
-+
-+#endif
-+
diff --git a/debian/patches/trademark_compliance.dpatch b/debian/patches/trademark_compliance.dpatch
deleted file mode 100644
index 3702790..0000000
--- a/debian/patches/trademark_compliance.dpatch
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## trademark compliance.dpatch by <root at debian.example.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-
-Index: ./indra/llwindow/llwindowsdl.cpp
-===================================================================
---- ./indra/llwindow/llwindowsdl.cpp (revision 353)
-+++ ./indra/llwindow/llwindowsdl.cpp (working copy)
-@@ -484,7 +484,7 @@
-
- // Set the application icon.
- SDL_Surface *bmpsurface;
-- bmpsurface = Load_BMP_Resource("ll_icon.BMP");
-+ bmpsurface = Load_BMP_Resource("viewericon.bmp");
- if (bmpsurface)
- {
- // This attempts to give a black-keyed mask to the icon.
-Index: indra/newview/llappviewer.cpp
-===================================================================
---- ./indra/newview/llappviewer.cpp (revision 382)
-+++ ./indra/newview/llappviewer.cpp (working copy)
-@@ -1756,7 +1756,7 @@
- mYieldTime = gSavedSettings.getS32("YieldTime");
-
- // XUI:translate
-- gSecondLife = "Second Life";
-+ gSecondLife = "Open Metaverse Viewer";
-
- // Read skin/branding settings if specified.
- if (! gDirUtilp->getSkinDir().empty() )
-@@ -2006,7 +2006,7 @@
-
- // always start windowed
- BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
-- gViewerWindow = new LLViewerWindow(window_title_str, "Second Life",
-+ gViewerWindow = new LLViewerWindow(window_title_str, "Open Metaverse Viewer",
- gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
- gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
- FALSE, ignorePixelDepth);
-
--
A client for connecting to 3D metaverses such as Linden Labs Secondlife(tm) and OpenSim grids
More information about the Pkg-games-commits
mailing list