From db9323dfce8320d83482bceb7a181afc3d285738 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Mon, 9 Jan 2017 09:07:48 -0600 Subject: [PATCH 1/9] ebuild from bug #84011 --- .../darwin-streaming-server-6.0.3.ebuild | 149 + ...darwin-streaming-server-6.0.3-gentoo.patch | 289 ++ .../darwin-streaming-server-6.0.3-linux.patch | 381 ++ .../darwin-streaming-server-6.0.3-ppc64.patch | 52 + ...in-streaming-server-6.0.3-x86_64-m32.patch | 12 + ...darwin-streaming-server-6.0.3-x86_64.patch | 4048 +++++++++++++++++ .../darwin-streaming-server/files/dss.rc | 26 + 7 files changed, 4957 insertions(+) create mode 100644 media-video/darwin-streaming-server/darwin-streaming-server-6.0.3.ebuild create mode 100644 media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-gentoo.patch create mode 100644 media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-linux.patch create mode 100644 media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-ppc64.patch create mode 100644 media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-x86_64-m32.patch create mode 100644 media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-x86_64.patch create mode 100644 media-video/darwin-streaming-server/files/dss.rc diff --git a/media-video/darwin-streaming-server/darwin-streaming-server-6.0.3.ebuild b/media-video/darwin-streaming-server/darwin-streaming-server-6.0.3.ebuild new file mode 100644 index 0000000..99d3250 --- /dev/null +++ b/media-video/darwin-streaming-server/darwin-streaming-server-6.0.3.ebuild @@ -0,0 +1,149 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: darwin-streaming-server-6.0.3.ebuild 2008-06-05 bpkroth $ + +inherit eutils + +MY_P="DarwinStreamingSrvr${PV}-Source" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Darwin Streaming Server allows you to send streaming media across the internet using the industry standard RTP and RTSP protocols." +HOMEPAGE="http://dss.macosforge.org/" +SRC_URI="http://dss.macosforge.org/downloads/${MY_P}.tar" + +LICENSE="APSL-2" + +[ "${ARCH}" == "amd64" ] && M32="+m32" + +SLOT="0" +KEYWORDS="~x86 ~amd64 ~ppc" +IUSE="ssl ${M32}" + +DEPEND="virtual/libc" + +RDEPEND="${DEPEND} + dev-lang/perl + !media-video/darwin-streaming-server-bin + ssl? ( dev-perl/Net-SSLeay )" + +DEPEND="${DEPEND}" + +src_unpack() { + unpack ${A} + + #Apply the patch to set proper FHS paths + cd ${WORKDIR} + epatch ${FILESDIR}/${P}-gentoo.patch + + # A patch to make things build nicely in linux: + # http://dss.macosforge.org/trac/ticket/6 + epatch ${FILESDIR}/${P}-linux.patch + + # Apply the patch to allow PPC64 w/ 32bit-UL to build as if it were i686. + # http://bugs.gentoo.org/show_bug.cgi?id=84011#c36 + # Warning: this is a hack. + if [ "${ARCH}" == "ppc" ] || [ ${ARCH} == "ppc64" ]; then + epatch ${FILESDIR}/${P}-ppc64.patch + fi + + # Apply patch to build on x86_64 + # http://dss.macosforge.org/trac/ticket/10 + if [ "${ARCH}" == "amd64" ]; then + epatch ${FILESDIR}/${P}-x86_64.patch + if use m32; then + epatch ${FILESDIR}/${P}-x86_64-m32.patch + else + ewarn "This package is currently unstable when builing 64-bit code." + ewarn "Please consider setting USE=\"m32\" to force 32-bit code." + ewarn "See: http://dss.macosforge.org/trac/ticket/10" + fi + fi +} + +src_compile() { + # run the included build script + ./Buildit || die "Darwin build script failed" +} + +src_install() { + # NOTE: Apple's custom build scripts makes it a real PITA + # to install to useful and expected locations. Consequently, + # the built binaries and configuration files are to be moved + # manually into their respective directories which correspond to + # the changed locations in the -gentoo.patch. + + # binaries go in here + ( + into /usr + dosbin DarwinStreamingServer + dobin PlaylistBroadcaster.tproj/PlaylistBroadcaster + dobin MP3Broadcaster/MP3Broadcaster + dobin StreamingLoadTool/StreamingLoadTool + dobin qtpasswd.tproj/qtpasswd + dobin WebAdmin/src/streamingadminserver.pl + dobin StreamingProxy.tproj/StreamingProxy + ) || die "failure!" + + # streaming server modules go in here + keepdir /usr/lib/dss + + # configuration files go in here + dodir /etc/dss + insinto /etc/dss + newins streamingserver.xml-POSIX streamingserver.xml-sample + newins streamingserver.xml-POSIX streamingserver.xml + doins relayconfig.xml-Sample + doins StreamingLoadTool/streamingloadtool.conf + doins qtusers + doins qtgroups + doins qtaccess + fowners root:nobody /etc/dss/qtusers + fowners root:nobody /etc/dss/qtgroups + fperms 0640 /etc/dss/qtusers + fperms 0640 /etc/dss/qtgroups + doins WebAdmin/streamingadminserver.conf + doins StreamingProxy.tproj/streamingproxy.conf + newins WebAdmin/streamingadminserver.pem streamingadminserver.pem-sample + + # server rc scripts go in here + insinto /etc/init.d + newins ${FILESDIR}/dss.rc dss + newins ${FILESDIR}/dss-admin.rc dss-admin + fperms +x /etc/init.d/dss + fperms +x /etc/init.d/dss-admin + + # log files are generated in here + keepdir /var/log/dss + fowners nobody:nobody /var/log/dss + + # admin web application goes in here + dodir /var/lib/dss/admin + cp -ax WebAdmin/WebAdminHtml/* ${D}/var/lib/dss/admin + dodir /var/lib/dss/media + cp -ax sample* ${D}/var/lib/dss/media + keepdir /var/lib/dss/media/http + keepdir /var/lib/dss/media/playlists + fowners nobody:nobody /var/lib/dss/media/playlists + + #Documentation goes in here + dodoc ReleaseNotes.txt + dodoc StreamingProxy.tproj/StreamingProxy.html +} + +# -gentoo.patch sets up the run_as creds as nobody:nobody +# there's no need to create this user. +#pkg_setup() { +# einfo "creating qtss group and user" +# enewgroup qtss +# enewuser qtss -1 /dev/null /bin/false "qtss" +#} + +pkg_postinst() { + # alert user that they need to create an user in the admin group + # before starting up the server. + einfo "If you intend on using the web-based admin interface you" + einfo "need to run 'qtpasswd -A admin ' before" + einfo "starting up the admin server. If you do not plan on" + einfo "using the admin interface you can just start the Darwin" + einfo "Streaming Server." +} diff --git a/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-gentoo.patch b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-gentoo.patch new file mode 100644 index 0000000..4a4796f --- /dev/null +++ b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-gentoo.patch @@ -0,0 +1,289 @@ +diff -Nur DarwinStreamingSrvr6.0.3-Source/defaultPaths.h DarwinStreamingSrvr6.0.3-Source.gentoo/defaultPaths.h +--- DarwinStreamingSrvr6.0.3-Source/defaultPaths.h 2008-05-05 18:29:00.000000000 -0500 ++++ DarwinStreamingSrvr6.0.3-Source.gentoo/defaultPaths.h 2008-06-05 12:07:33.000000000 -0500 +@@ -58,11 +58,11 @@ + + # define DEFAULTPATHS_DIRECTORY_SEPARATOR "/" + +-# define DEFAULTPATHS_ETC_DIR "/etc/streaming/" ++# define DEFAULTPATHS_ETC_DIR "/etc/dss/" + # define DEFAULTPATHS_ETC_DIR_OLD "/etc/" +-# define DEFAULTPATHS_SSM_DIR "/usr/local/sbin/StreamingServerModules/" +-# define DEFAULTPATHS_LOG_DIR "/var/streaming/logs/" +-# define DEFAULTPATHS_MOVIES_DIR "/usr/local/movies/" ++# define DEFAULTPATHS_SSM_DIR "/usr/lib/dss/" ++# define DEFAULTPATHS_LOG_DIR "/var/log/dss/" ++# define DEFAULTPATHS_MOVIES_DIR "/var/lib/dss/media/" + # define DEFAULTPATHS_PID_DIR "/var/run/" + + #endif +diff -Nur DarwinStreamingSrvr6.0.3-Source/qtaccess DarwinStreamingSrvr6.0.3-Source.gentoo/qtaccess +--- DarwinStreamingSrvr6.0.3-Source/qtaccess 2007-11-15 23:17:59.000000000 -0600 ++++ DarwinStreamingSrvr6.0.3-Source.gentoo/qtaccess 2008-06-05 12:08:33.000000000 -0500 +@@ -26,7 +26,7 @@ + # If not given, the default filename is /etc/streaming/qtusers for POSIX + # usage: AuthUserFile + #AuthUserFile /etc/streaming/qtusers +-AuthUserFile /Library/QuickTimeStreaming/Config/qtusers ++AuthUserFile /etc/dss/qtusers + + # AuthGroupFile: The filename that contains the groups and the + # users that belong to each group +@@ -34,7 +34,7 @@ + # If not given, the default filename is /etc/streaming/qtgroups for POSIX + # usage: AuthGroupFile + #AuthGroupFile /etc/streaming/qtgroups +-AuthGroupFile /Library/QuickTimeStreaming/Config/qtgroups ++AuthGroupFile /etc/dss/qtgroups + + # require user: The names next to this specify which user + # is allowed to access the media in this folder +@@ -60,8 +60,8 @@ + # usage: ... + + AuthName "streaming server broadcaster realm" +- AuthUserFile /Library/QuickTimeStreaming/Config/qtbroadcastusers +- AuthGroupFile /Library/QuickTimeStreaming/Config/qtbroadcastgroups ++ AuthUserFile /etc/dss/qtbroadcastusers ++ AuthGroupFile /etc/dss/qtbroadcastgroups + require group broadcaster + + +diff -Nur DarwinStreamingSrvr6.0.3-Source/qtgroups DarwinStreamingSrvr6.0.3-Source.gentoo/qtgroups +--- DarwinStreamingSrvr6.0.3-Source/qtgroups 2007-11-15 23:18:00.000000000 -0600 ++++ DarwinStreamingSrvr6.0.3-Source.gentoo/qtgroups 2008-06-05 12:08:51.000000000 -0500 +@@ -1 +1 @@ +-admin: aGFja21l ++admin: +diff -Nur DarwinStreamingSrvr6.0.3-Source/qtusers DarwinStreamingSrvr6.0.3-Source.gentoo/qtusers +--- DarwinStreamingSrvr6.0.3-Source/qtusers 2007-11-15 23:18:07.000000000 -0600 ++++ DarwinStreamingSrvr6.0.3-Source.gentoo/qtusers 2008-06-05 12:09:08.000000000 -0500 +@@ -1,2 +1 @@ + realm Streaming Server +-aGFja21l:0muym.z3yrHSw:fa000739887bb2871bcf0c9201b5ebd5 +diff -Nur DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServerPrefs.cpp DarwinStreamingSrvr6.0.3-Source.gentoo/Server.tproj/QTSServerPrefs.cpp +--- DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServerPrefs.cpp 2008-05-05 18:28:59.000000000 -0500 ++++ DarwinStreamingSrvr6.0.3-Source.gentoo/Server.tproj/QTSServerPrefs.cpp 2008-06-05 13:06:11.000000000 -0500 +@@ -124,8 +124,8 @@ + { kDontAllowMultipleValues, "false", NULL }, //do_report_http_connection_ip_address + { kDontAllowMultipleValues, "Streaming Server", NULL }, //default_authorization_realm + #ifndef __Win32__ +- { kDontAllowMultipleValues, "qtss", NULL }, //run_user_name +- { kDontAllowMultipleValues, "qtss", NULL }, //run_group_name ++ { kDontAllowMultipleValues, "nobody", NULL }, //run_user_name ++ { kDontAllowMultipleValues, "nobody", NULL }, //run_group_name + #else + { kDontAllowMultipleValues, "", NULL }, //run_user_name + { kDontAllowMultipleValues, "", NULL }, //run_group_name +diff -Nur DarwinStreamingSrvr6.0.3-Source/streamingserver.xml-POSIX DarwinStreamingSrvr6.0.3-Source.gentoo/streamingserver.xml-POSIX +--- DarwinStreamingSrvr6.0.3-Source/streamingserver.xml-POSIX 2008-03-25 19:42:51.000000000 -0500 ++++ DarwinStreamingSrvr6.0.3-Source.gentoo/streamingserver.xml-POSIX 2008-06-05 12:14:50.000000000 -0500 +@@ -1,5 +1,5 @@ + +- ++ + + +@@ -79,7 +79,7 @@ + 7 + + +- /var/streaming/logs ++ /var/log/dss + + + Error +@@ -88,7 +88,7 @@ + /var/run/DarwinStreamingServer.pid + + +- /usr/local/sbin/StreamingServerModules ++ /usr/lib/dss + + + false +@@ -121,7 +121,7 @@ + 0 + + +- /usr/local/movies ++ /var/lib/dss/media + + + +@@ -145,10 +145,10 @@ + 0 + + +- ++ nobody + + +- ++ nobody + + + +@@ -297,10 +297,10 @@ + 10240000 + + +- /var/streaming/logs ++ /var/log/dss + + +- StreamingServer ++ dss + + + +@@ -371,7 +371,7 @@ + mp3_access + + +- /var/streaming/logs ++ /var/log/dss + + + +@@ -403,14 +403,14 @@ + false + + +- /usr/local/movies/http ++ /var/lib/dss/media/http + + + true + + Http + +- /var/streaming/logs ++ /var/log/dss + + + 256000 +@@ -525,7 +525,7 @@ + + + +- /etc/streaming/relayconfig.xml ++ /etc/dss/relayconfig.xml + + + +@@ -537,10 +537,10 @@ + qtaccess + + +- /etc/streaming/qtgroups ++ /etc/dss/qtgroups + + +- /etc/streaming/qtusers ++ /etc/dss/qtusers + + + +diff -Nur DarwinStreamingSrvr6.0.3-Source/WebAdmin/src/streamingadminserver.pl DarwinStreamingSrvr6.0.3-Source.gentoo/WebAdmin/src/streamingadminserver.pl +--- DarwinStreamingSrvr6.0.3-Source/WebAdmin/src/streamingadminserver.pl 2008-05-05 18:28:57.000000000 -0500 ++++ DarwinStreamingSrvr6.0.3-Source.gentoo/WebAdmin/src/streamingadminserver.pl 2008-06-05 12:03:43.000000000 -0500 +@@ -78,7 +78,7 @@ + $defaultConfigPath = "/Library/QuickTimeStreaming/Config/streamingadminserver.conf"; + } + else { +- $defaultConfigPath = "/etc/streaming/streamingadminserver.conf"; ++ $defaultConfigPath = "/etc/dss/streamingadminserver.conf"; + } + + $debug = 0; +@@ -229,8 +229,8 @@ + else { + %vital = ("port", 1220, + "sslport", 1240, +- "root", "/var/streaming/AdminHtml", +- "plroot", "/var/streaming/playlists/", ++ "root", "/var/lib/dss/admin", ++ "plroot", "/var/lib/dss/media/playlists/", + "server", "DSS 6.0 Admin Server/1.0", + "index_docs", "index.html parse_xml.cgi index.htm index.cgi", + "addtype_html", "text/html", +@@ -245,28 +245,28 @@ + "realm", "DSS Admin Server", + "qtssIPAddress", "localhost", + "qtssPort", "554", +- "qtssName", "/usr/local/sbin/DarwinStreamingServer", ++ "qtssName", "/usr/sbin/DarwinStreamingServer", + "qtssAutoStart", "1", +- "logfile", "/var/streaming/logs/streamingadminserver.log", ++ "logfile", "/var/log/dss/streamingadminserver.log", + "log", "1", + "logclear", "0", + "logtime", "168", + "messagesfile", "messages", + "gbrowse", "0", + "ssl", "0", +- "crtfile", "/etc/streaming/streamingadminserver.pem", +- "keyfile", "/etc/streaming/streamingadminserver.pem", ++ "crtfile", "/etc/dss/streamingadminserver.pem", ++ "keyfile", "/etc/dss/streamingadminserver.pem", + #"keypasswordfile", "", +- "qtssQTPasswd", "/usr/local/bin/qtpasswd", +- "qtssPlaylistBroadcaster", "/usr/local/bin/PlaylistBroadcaster", +- "qtssMP3Broadcaster", "/usr/local/bin/MP3Broadcaster", ++ "qtssQTPasswd", "/usr/bin/qtpasswd", ++ "qtssPlaylistBroadcaster", "/usr/bin/PlaylistBroadcaster", ++ "qtssMP3Broadcaster", "/usr/bin/MP3Broadcaster", + "helpurl", "http://helpqt.apple.com/dssWebAdminHelpR3/dssWebAdmin.help/DSSHelp.htm", + "tempfileloc", "/tmp", + "qtssAdmin", "streamingadmin", + "cacheMessageFiles", "0", + "pidfile", "/var/run/streamingadminserver.pid", +- "runUser", "qtss", +- "runGroup", "qtss", ++ "runUser", "nobody", ++ "runGroup", "nobody", + "cookieExpireSeconds", "600" + ); + } +diff -Nur DarwinStreamingSrvr6.0.3-Source/WebAdmin/streamingadminserver.conf DarwinStreamingSrvr6.0.3-Source.gentoo/WebAdmin/streamingadminserver.conf +--- DarwinStreamingSrvr6.0.3-Source/WebAdmin/streamingadminserver.conf 2007-11-15 23:16:39.000000000 -0600 ++++ DarwinStreamingSrvr6.0.3-Source.gentoo/WebAdmin/streamingadminserver.conf 2008-06-05 12:06:26.000000000 -0500 +@@ -6,11 +6,11 @@ + + # The root directory for all the html and cgi files + # The path should be absolute +-root=/Library/QuickTimeStreaming/AdminHtml ++root=/var/lib/dss/admin + + # The root directory for play lists managed by the adminserver + # The path should be absolute +-plroot=/Library/QuickTimeStreaming/Playlists ++plroot=/var/lib/dss/media/playlists + + # The host name of the streaming admin server + host=foo.bar.com +@@ -22,11 +22,11 @@ + qtssPort=554 + + # The name of the streaming server binary +-qtssName=/usr/sbin/QuickTimeStreamingServer ++qtssName=/usr/sbin/DarwinStreamingServer + + # If set to 1, admin server will start qtss when it is launched + # If set to 0, qtss will not be launched when the admin starts up +-qtssAutoStart=1 ++qtssAutoStart=0 + + # To add new mime types + # If the suffix is xxx, and the +@@ -41,7 +41,7 @@ + log=1 + + # The full path of the streaming admin server log file +-logfile=/Library/QuickTimeStreaming/Logs/streamingadminserver.log ++logfile=/var/log/dss/streamingadminserver.log + + # Number of hours before which logs are rolled + logtime=168 diff --git a/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-linux.patch b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-linux.patch new file mode 100644 index 0000000..87dac4c --- /dev/null +++ b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-linux.patch @@ -0,0 +1,381 @@ +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/APICommonCode/QTAccessFile.cpp DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTAccessFile.cpp +--- DarwinStreamingSrvr6.0.3-Source.orig/APICommonCode/QTAccessFile.cpp 2008-05-06 01:28:57.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTAccessFile.cpp 2008-05-24 03:23:13.000000000 +0200 +@@ -46,7 +46,9 @@ + + + #include ++#ifdef __MacOSX__ + #include ++#endif + #include + #include + #include +@@ -613,6 +615,7 @@ + + bool DSAccessFile::CheckGroupMembership(const char* inUsername, const char* inGroupName) + { ++#ifdef __MacOSX__ + // In Tiger, group membership is painfully simple: we ask memberd for it! + struct passwd *user = NULL; + struct group *group = NULL; +@@ -641,6 +644,9 @@ + if ( mbr_check_membership(userID, groupID, &isMember) ) + return false; + return (bool)isMember; ++#else ++ return true; ++#endif + } + + Bool16 DSAccessFile::ValidUser( char*userName, void* extraDataPtr) +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSHeaders.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h +--- DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSHeaders.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h 2008-05-24 02:05:15.000000000 +0200 +@@ -120,7 +120,6 @@ + + + #elif __linux__ || __linuxppc__ || __FreeBSD__ +- + /* Defines */ + #define _64BITARG_ "q" + #define _S64BITARG_ "lld" +@@ -128,9 +127,13 @@ + #if __LP64__ + #define _S32BITARG_ "d" + #define _U32BITARG_ "u" ++ #define _SPOINTERSIZEARG_ _S64BITARG_ ++ #define _UPOINTERSIZEARG_ _U64BITARG_ + #else +- #define _S32BITARG_ "ld" +- #define _U32BITARG_ "lu" ++ #define _S32BITARG_ "d" ++ #define _U32BITARG_ "u" ++ #define _SPOINTERSIZEARG_ _S32BITARG_ ++ #define _UPOINTERSIZEARG_ _U32BITARG_ + #endif + + /* paths */ +@@ -141,6 +144,7 @@ + + /* Includes */ + #include ++ #include + + /* Constants */ + #define QT_TIME_TO_LOCAL_TIME (-2082844800) +@@ -149,14 +153,14 @@ + /* Typedefs */ + typedef signed long PointerSizedInt; + typedef unsigned long PointerSizedUInt; +- typedef unsigned char UInt8; +- typedef signed char SInt8; +- typedef unsigned short UInt16; +- typedef signed short SInt16; +- typedef unsigned int UInt32; +- typedef signed int SInt32; +- typedef signed int int SInt64; +- typedef unsigned int int UInt64; ++ typedef uint8_t UInt8; ++ typedef int8_t SInt8; ++ typedef uint16_t UInt16; ++ typedef int16_t SInt16; ++ typedef uint32_t UInt32; ++ typedef int32_t SInt32; ++ typedef int64_t SInt64; ++ typedef uint64_t UInt64; + typedef float Float32; + typedef double Float64; + typedef UInt16 Bool16; +@@ -177,11 +181,14 @@ + + #define TW0_CHARS_TO_INT( c1, c2 ) ( c1 << 8 | c2 ) + ++ #define kSInt16_Max USHRT_MAX ++ #define kUInt16_Max USHRT_MAX + ++ #define kSInt32_Max LONG_MAX ++ #define kUInt32_Max ULONG_MAX + +- +- +- ++ #define kSInt64_Max LONG_LONG_MAX ++ #define kUInt64_Max ULONG_LONG_MAX + + #elif __Win32__ + +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSRef.h DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSRef.h +--- DarwinStreamingSrvr6.0.3-Source.orig/CommonUtilitiesLib/OSRef.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSRef.h 2008-05-23 22:28:51.000000000 +0200 +@@ -45,6 +45,7 @@ + #include "StrPtrLen.h" + #include "OSHashTable.h" + #include "OSCond.h" ++#include "OSHeaders.h" + + class OSRefKey; + +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX +--- DarwinStreamingSrvr6.0.3-Source.orig/Makefile.POSIX 2007-11-16 06:17:59.000000000 +0100 ++++ DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX 2008-05-24 07:19:34.000000000 +0200 +@@ -42,7 +42,6 @@ + CCFLAGS += -IRTPMetaInfoLib + CCFLAGS += -IPrefsSourceLib + CCFLAGS += -IServer.tproj +- + # EACH DIRECTORY WITH A STATIC LIBRARY MUST BE APPENDED IN THIS MANNER TO THE LINKOPTS + + LINKOPTS = -LCommonUtilitiesLib +@@ -52,38 +51,42 @@ + + CFILES = CommonUtilitiesLib/daemon.c + +-CPPFILES = Server.tproj/QTSSExpirationDate.cpp\ ++CPPFILES = Server.tproj/GenerateXMLPrefs.cpp \ ++ Server.tproj/main.cpp \ + Server.tproj/QTSSCallbacks.cpp \ +- Server.tproj/QTSSDictionary.cpp\ + Server.tproj/QTSSDataConverter.cpp \ ++ Server.tproj/QTSSDictionary.cpp \ + Server.tproj/QTSSErrorLogModule.cpp \ +- Server.tproj/QTSSMessages.cpp\ ++ Server.tproj/QTSServer.cpp \ ++ Server.tproj/QTSServerInterface.cpp \ ++ Server.tproj/QTSServerPrefs.cpp \ ++ Server.tproj/QTSSExpirationDate.cpp \ ++ Server.tproj/QTSSFile.cpp \ ++ Server.tproj/QTSSMessages.cpp \ + Server.tproj/QTSSModule.cpp \ +- Server.tproj/QTSServerPrefs.cpp\ +- Server.tproj/QTSSSocket.cpp\ +- Server.tproj/QTSSFile.cpp\ + Server.tproj/QTSSPrefs.cpp \ +- Server.tproj/QTSServer.cpp\ +- Server.tproj/QTSServerInterface.cpp \ +- Server.tproj/RTCPTask.cpp\ +- Server.tproj/RTPSession.cpp \ +- Server.tproj/RTPPacketResender.cpp \ ++ Server.tproj/QTSSSocket.cpp \ ++ Server.tproj/QTSSUserProfile.cpp \ ++ Server.tproj/RTCPTask.cpp \ + Server.tproj/RTPBandwidthTracker.cpp \ + Server.tproj/RTPOverbufferWindow.cpp \ +- Server.tproj/RTPSessionInterface.cpp\ ++ Server.tproj/RTPPacketResender.cpp \ ++ Server.tproj/RTPSession3GPP.cpp \ ++ Server.tproj/RTPSession.cpp \ ++ Server.tproj/RTPSessionInterface.cpp \ ++ Server.tproj/RTPStream3gpp.cpp \ + Server.tproj/RTPStream.cpp \ +- Server.tproj/RTSPProtocol.cpp\ ++ Server.tproj/RTSPProtocol.cpp \ ++ Server.tproj/RTSPRequest3GPP.cpp \ + Server.tproj/RTSPRequest.cpp \ +- Server.tproj/RTSPRequestInterface.cpp\ ++ Server.tproj/RTSPRequestInterface.cpp \ + Server.tproj/RTSPRequestStream.cpp \ +- Server.tproj/RTSPResponseStream.cpp\ ++ Server.tproj/RTSPResponseStream.cpp \ ++ Server.tproj/RTSPSession3GPP.cpp \ + Server.tproj/RTSPSession.cpp \ +- Server.tproj/RTSPSessionInterface.cpp\ +- Server.tproj/main.cpp \ ++ Server.tproj/RTSPSessionInterface.cpp \ + Server.tproj/RunServer.cpp \ +- Server.tproj/GenerateXMLPrefs.cpp \ +- Server.tproj/QTSSUserProfile.cpp\ +- PrefsSourceLib/FilePrefsSource.cpp\ ++ PrefsSourceLib/FilePrefsSource.cpp \ + PrefsSourceLib/XMLPrefsParser.cpp \ + PrefsSourceLib/XMLParser.cpp \ + OSMemoryLib/OSMemory.cpp \ +@@ -91,17 +94,20 @@ + RTSPClientLib/ClientSocket.cpp \ + HTTPUtilitiesLib/HTTPProtocol.cpp \ + HTTPUtilitiesLib/HTTPRequest.cpp \ +- RTCPUtilitiesLib/RTCPAPPPacket.cpp\ ++ RTCPUtilitiesLib/RTCPAckPacket.cpp \ ++ RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \ ++ RTCPUtilitiesLib/RTCPAPPPacket.cpp \ ++ RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \ + RTCPUtilitiesLib/RTCPPacket.cpp \ +- RTCPUtilitiesLib/RTCPSRPacket.cpp\ +- RTCPUtilitiesLib/RTCPAckPacket.cpp\ +- RTPMetaInfoLib/RTPMetaInfoPacket.cpp\ ++ RTCPUtilitiesLib/RTCPSRPacket.cpp \ ++ RTPMetaInfoLib/RTPMetaInfoPacket.cpp \ + APIStubLib/QTSS_Private.cpp \ + APICommonCode/QTSSModuleUtils.cpp\ + APICommonCode/QTSSRollingLog.cpp \ + APICommonCode/SDPSourceInfo.cpp \ + APICommonCode/SourceInfo.cpp \ + APICommonCode/QTAccessFile.cpp \ ++ APICommonCode/QTSS3GPPModuleUtils.cpp \ + SafeStdLib/InternalStdLib.cpp \ + APIModules/QTSSAccessLogModule/QTSSAccessLogModule.cpp \ + APIModules/QTSSFileModule/QTSSFileModule.cpp \ +@@ -129,7 +135,7 @@ + APIModules/QTSSAccessModule/QTSSAccessModule.cpp \ + APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp \ + APIModules/QTSSAccessModule/AccessChecker.cpp +- ++ + # CCFLAGS += $(foreach dir,$(HDRS),-I$(dir)) + + LIBFILES = QTFileLib/libQTFileLib.a \ +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/RTSPClientLib/PlayerSimulator.h DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/PlayerSimulator.h +--- DarwinStreamingSrvr6.0.3-Source.orig/RTSPClientLib/PlayerSimulator.h 2008-05-06 01:29:00.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/PlayerSimulator.h 2008-05-24 02:08:45.000000000 +0200 +@@ -31,7 +31,7 @@ + #ifndef _PLAYERSIMULATOR_H_ + #define _PLAYERSIMULATOR_H_ + +-#include "SafeStdLib.h"" ++#include "SafeStdLib.h" + #include "OSHeaders.h" + #include "OS.h" + #include "SVector.h" +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSSErrorLogModule.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSSErrorLogModule.cpp +--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSSErrorLogModule.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSSErrorLogModule.cpp 2008-05-24 02:58:48.000000000 +0200 +@@ -265,7 +265,11 @@ + + sDupErrorStringCount = 0; + } +- ::strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString)); ++#if __MacOSX__ ++ strlcpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString)); ++#else ++ strncpy(sLastErrorString, inParamBlock->errorParams.inBuffer, sizeof(sLastErrorString) -1); ++#endif + + } + +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSServer.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp +--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/QTSServer.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp 2008-05-24 07:24:39.000000000 +0200 +@@ -70,7 +70,9 @@ + #include "QTSSAdminModule.h" + #include "QTSSAccessModule.h" + #include "QTSSMP3StreamingModule.h" ++#if __MacOSX__ + #include "QTSSDSAuthModule.h" ++#endif + #if MEMORY_DEBUGGING + #include "QTSSWebDebugModule.h" + #endif +@@ -85,7 +87,7 @@ + #include "RTCPTask.h" + #include "QTSSFile.h" + +-#include "RTPStream3GPP.h" ++#include "RTPStream3gpp.h" + #include "RTSPRequest3GPP.h" + + // CLASS DEFINITIONS +@@ -680,9 +682,11 @@ + (void)AddModule(theWebDebug); + #endif + ++#if __MacOSX__ + QTSSModule* theQTSSDSAuthModule = new QTSSModule("QTSSDSAuthModule"); + (void)theQTSSDSAuthModule->SetupModule(&sCallbacks, &QTSSDSAuthModule_Main); + (void)AddModule(theQTSSDSAuthModule); ++#endif + + QTSSModule* theQTACCESSmodule = new QTSSModule("QTSSAccessModule"); + (void)theQTACCESSmodule->SetupModule(&sCallbacks, &QTSSAccessModule_Main); +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPSession.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPSession.cpp +--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPSession.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPSession.cpp 2008-05-24 02:39:34.000000000 +0200 +@@ -38,7 +38,7 @@ + #include "RTSPProtocol.h" + #include "QTSServerInterface.h" + #include "QTSS.h" +-#include "RTSPRequest3gpp.h" ++#include "RTSPRequest3GPP.h" + + #include "OS.h" + #include "OSMemory.h" +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream3gpp.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream3gpp.cpp +--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream3gpp.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream3gpp.cpp 2008-05-24 02:48:52.000000000 +0200 +@@ -34,7 +34,7 @@ + #include "RTPStream.h" + #include "RTPStream3gpp.h" + #include "RTPSessionInterface.h" +-#include "RTSPRequest3gpp.h" ++#include "RTSPRequest3GPP.h" + #include "RTCPAPPNADUPacket.h" + + #if DEBUG +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream.h DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.h +--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTPStream.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.h 2008-05-24 02:36:24.000000000 +0200 +@@ -57,7 +57,7 @@ + + #include "RTCPPacket.h" + +-#include "RTSPRequest3gpp.h" ++#include "RTSPRequest3GPP.h" + + #ifndef MIN + #define MIN(a,b) (((a)<(b))?(a):(b)) +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTSPRequest3GPP.cpp DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequest3GPP.cpp +--- DarwinStreamingSrvr6.0.3-Source.orig/Server.tproj/RTSPRequest3GPP.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequest3GPP.cpp 2008-05-24 02:49:26.000000000 +0200 +@@ -32,7 +32,7 @@ + */ + + +-#include "RTSPRequest3gpp.h" ++#include "RTSPRequest3GPP.h" + #include "RTSPProtocol.h" + #include "QTSServerInterface.h" + +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX +--- DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/Makefile.POSIX 2007-11-16 06:17:36.000000000 +0100 ++++ DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX 2008-05-24 02:32:03.000000000 +0200 +@@ -17,6 +17,7 @@ + CCFLAGS += -I.. + CCFLAGS += -I../OSMemoryLib + CCFLAGS += -I../RTSPClientLib ++CCFLAGS += -I../RTCPUtilitiesLib + CCFLAGS += -I../APICommonCode + CCFLAGS += -I../CommonUtilitiesLib + CCFLAGS += -I../PrefsSourceLib +@@ -36,6 +37,12 @@ + ../RTSPClientLib/ClientSocket.cpp \ + ../RTSPClientLib/RTSPClient.cpp \ + ../RTSPClientLib/ClientSession.cpp \ ++ ../RTCPUtilitiesLib/RTCPAckPacket.cpp \ ++ ../RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \ ++ ../RTCPUtilitiesLib/RTCPAPPPacket.cpp \ ++ ../RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \ ++ ../RTCPUtilitiesLib/RTCPPacket.cpp \ ++ ../RTCPUtilitiesLib/RTCPSRPacket.cpp \ + ../PrefsSourceLib/FilePrefsSource.cpp \ + ../APICommonCode/SDPSourceInfo.cpp \ + ../APICommonCode/SourceInfo.cpp \ +diff -ur --exclude='*~' DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/StreamingLoadTool.cpp DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp +--- DarwinStreamingSrvr6.0.3-Source.orig/StreamingLoadTool/StreamingLoadTool.cpp 2008-05-06 01:28:57.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp 2008-05-24 02:22:13.000000000 +0200 +@@ -743,7 +743,7 @@ + + bitsReceived += .5; + +- printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n", ++ printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n", + ClientSession:: GetActiveConnections (), + ClientSession:: GetPlayingConnections (), + ClientSession:: GetConnectionAttempts (), +@@ -811,7 +811,7 @@ + if (sLog != NULL) + ::fclose(sLog); + +- printf("%5lu %6lu %8lu %6lu %6lu %6lu %9.0fk\n", ++ printf("%5"_U32BITARG_" %6"_U32BITARG_" %8"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %6"_U32BITARG_" %9.0fk\n", + ClientSession:: GetActiveConnections (), + ClientSession:: GetPlayingConnections (), + ClientSession:: GetConnectionAttempts (), diff --git a/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-ppc64.patch b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-ppc64.patch new file mode 100644 index 0000000..2e6d8c9 --- /dev/null +++ b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-ppc64.patch @@ -0,0 +1,52 @@ +diff -Naur DarwinStreamingSrvr6.0.3-Source/APIStubLib/BuildAPIStubLib DarwinStreamingSrvr6.0.3-Source.patched/APIStubLib/BuildAPIStubLib +--- DarwinStreamingSrvr6.0.3-Source/APIStubLib/BuildAPIStubLib 2002-09-09 19:58:14.000000000 -0500 ++++ DarwinStreamingSrvr6.0.3-Source.patched/APIStubLib/BuildAPIStubLib 2007-07-16 09:02:31.000000000 -0500 +@@ -2,6 +2,9 @@ + + x=`uname` + y=`uname -m` ++if [ "$y" == "ppc64" ]; then ++ y="i686" ++fi + + PLAT=$x.$y + +diff -Naur DarwinStreamingSrvr6.0.3-Source/Buildit DarwinStreamingSrvr6.0.3-Source.patched/Buildit +--- DarwinStreamingSrvr6.0.3-Source/Buildit 2006-07-14 04:36:35.000000000 -0500 ++++ DarwinStreamingSrvr6.0.3-Source.patched/Buildit 2007-07-16 09:03:07.000000000 -0500 +@@ -55,6 +55,9 @@ + + OSNAME=`uname` + HARDWARENAME=`uname -m` ++if [ "$HARDWARENAME" == "ppc64" ]; then ++ HARDWARENAME="i686" ++fi + + PLAT=$OSNAME.$HARDWARENAME + +diff -Naur DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/BuildPlaylist DarwinStreamingSrvr6.0.3-Source.patched/PlaylistBroadcaster.tproj/BuildPlaylist +--- DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/BuildPlaylist 2002-09-09 20:07:18.000000000 -0500 ++++ DarwinStreamingSrvr6.0.3-Source.patched/PlaylistBroadcaster.tproj/BuildPlaylist 2007-07-16 09:03:28.000000000 -0500 +@@ -2,6 +2,9 @@ + + x=`uname` + y=`uname -m` ++if [ "$y" == "ppc64" ]; then ++ y="i686" ++fi + + PLAT=$x.$y + +diff -Naur DarwinStreamingSrvr6.0.3-Source/StreamingProxy.tproj/BuildProxy DarwinStreamingSrvr6.0.3-Source.patched/StreamingProxy.tproj/BuildProxy +--- DarwinStreamingSrvr6.0.3-Source/StreamingProxy.tproj/BuildProxy 2001-11-13 16:46:00.000000000 -0600 ++++ DarwinStreamingSrvr6.0.3-Source.patched/StreamingProxy.tproj/BuildProxy 2007-07-16 09:03:42.000000000 -0500 +@@ -2,6 +2,9 @@ + + x=`uname` + y=`uname -m` ++if [ "$y" == "ppc64" ]; then ++ y="i686" ++fi + + PLAT=$x.$y + diff --git a/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-x86_64-m32.patch b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-x86_64-m32.patch new file mode 100644 index 0000000..0090dc8 --- /dev/null +++ b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-x86_64-m32.patch @@ -0,0 +1,12 @@ +diff -Nur DarwinStreamingSrvr6.0.3-Source/Buildit DarwinStreamingSrvr6.0.3-Source.x86_64-m32/Buildit +--- DarwinStreamingSrvr6.0.3-Source/Buildit 2008-06-05 12:29:29.000000000 -0500 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64-m32/Buildit 2008-06-05 12:30:22.000000000 -0500 +@@ -116,7 +116,7 @@ + LINKER='gcc' + MAKE=make + +- COMPILER_FLAGS="-D_REENTRANT -D__USE_POSIX -D__linux__ -pipe -fPIC" ++ COMPILER_FLAGS="-D_REENTRANT -D__USE_POSIX -D__linux__ -pipe -fPIC -m32" + INCLUDE_FLAG="-include" + + CORE_LINK_LIBS="-lpthread -ldl -lstdc++ -lm -lcrypt" diff --git a/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-x86_64.patch b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-x86_64.patch new file mode 100644 index 0000000..dddc137 --- /dev/null +++ b/media-video/darwin-streaming-server/files/darwin-streaming-server-6.0.3-x86_64.patch @@ -0,0 +1,4048 @@ +diff -ur DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTSSModuleUtils.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APICommonCode/QTSSModuleUtils.cpp +--- DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTSSModuleUtils.cpp 2008-05-06 01:28:57.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APICommonCode/QTSSModuleUtils.cpp 2008-05-30 23:30:13.000000000 +0200 +@@ -29,6 +29,7 @@ + + */ + ++#include + #include "QTSSModuleUtils.h" + #include "QTSS_Private.h" + +@@ -282,7 +283,7 @@ + RTPMetaInfoPacket::FieldName* theFieldName = (RTPMetaInfoPacket::FieldName*)theHeader.Ptr; + ::memcpy (&fieldNameValue, theFieldName, sizeof(UInt16)); + +- RTPMetaInfoPacket::FieldIndex theFieldIndex = RTPMetaInfoPacket::GetFieldIndexForName(ntohs(fieldNameValue)); ++ RTPMetaInfoPacket::FieldIndex theFieldIndex = RTPMetaInfoPacket::GetFieldIndexForName(bswap_16(fieldNameValue)); + + // + // This field is not supported (not in the field ID array), so +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSAdminModule/AdminElementNode.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSAdminModule/AdminElementNode.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSAdminModule/AdminElementNode.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSAdminModule/AdminElementNode.cpp 2008-05-30 23:06:56.000000000 +0200 +@@ -934,7 +934,7 @@ + fFieldOSRefPtrs[index] = NEW OSRef(); Assert(fFieldOSRefPtrs[index] != NULL); ElementNode_InsertPtr(fFieldOSRefPtrs[index],"ElementNode::GetOSRef NEW OSRef() fFieldOSRefPtrs "); + GetNameSPL(index,&theName); Assert(theName.Len != 0); + //qtss_printf("ElementNode::GetOSRef index = %"_S32BITARG_" name = %s \n", index, theName.Ptr); +- fFieldOSRefPtrs[index]->Set(theName,(void *) index); ++ fFieldOSRefPtrs[index]->Set(theName,(void *)intptr_t(index)); + if (0 != theName.Len && NULL != theName.Ptr) //return the ptr else NULL + resultPtr = fFieldOSRefPtrs[index]; + } +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSFileModule/QTSSFileModule.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSFileModule/QTSSFileModule.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSFileModule/QTSSFileModule.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSFileModule/QTSSFileModule.cpp 2008-05-30 23:30:28.000000000 +0200 +@@ -31,6 +31,7 @@ + + */ + ++#include + #include + + #include "QTSSFileModule.h" +@@ -190,7 +191,7 @@ + + inline UInt16 GetPacketSequenceNumber(void * packetDataPtr) + { +- return ntohs( ((UInt16*)packetDataPtr)[1]); ++ return bswap_16( ((UInt16*)packetDataPtr)[1]); + } + + inline UInt16 GetLastPacketSeqNum(QTSS_Object stream) +@@ -218,18 +219,18 @@ + + inline void SetPacketSequenceNumber(UInt16 newSequenceNumber, void * packetDataPtr) + { +- ((UInt16*)packetDataPtr)[1] = htons(newSequenceNumber); ++ ((UInt16*)packetDataPtr)[1] = bswap_16(newSequenceNumber); + } + + + inline UInt32 GetPacketTimeStamp(void * packetDataPtr) + { +- return ntohl( ((UInt32*)packetDataPtr)[1]); ++ return bswap_32( ((UInt32*)packetDataPtr)[1]); + } + + inline void SetPacketTimeStamp(UInt32 newTimeStamp, void * packetDataPtr) + { +- ((UInt32*)packetDataPtr)[1] = htonl(newTimeStamp); ++ ((UInt32*)packetDataPtr)[1] = bswap_32(newTimeStamp); + } + + inline UInt32 CalculatePauseTimeStamp(UInt32 timescale, SInt64 totalPauseTime, UInt32 currentTimeStamp) +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSHttpFileModule/QTSSHttpFileModule.cpp 2008-05-30 23:31:23.000000000 +0200 +@@ -30,6 +30,7 @@ + + + #ifndef __Win32__ ++#include + #include + #include + #endif +@@ -1068,7 +1069,7 @@ + if( rmra == NULL ) + return NULL; + +- rmraLen = htonl(rmraLen); ++ rmraLen = bswap_32(rmraLen); + + ::memcpy(&rmra[0], &rmraLen, 4); + ::memcpy(&rmra[1], "rmra", 4); +@@ -1076,20 +1077,20 @@ + + // Make the MOOV + +- *moovLen = ntohl(rmraLen) + 8; ++ *moovLen = bswap_32(rmraLen) + 8; + moov = NEW UInt32[*moovLen]; + if( moov == NULL ) + return NULL; + +- *moovLen = htonl(*moovLen); ++ *moovLen = bswap_32(*moovLen); + + ::memcpy(&moov[0], moovLen, 4); + ::memcpy(&moov[1], "moov", 4); +- ::memcpy((char *)moov + 8, rmra, ntohl(rmraLen)); ++ ::memcpy((char *)moov + 8, rmra, bswap_32(rmraLen)); + + delete rmra; + +- *moovLen = ntohl(*moovLen); ++ *moovLen = bswap_32(*moovLen); + + // moov needs to be deleted by the calling function + return moov; +@@ -1099,8 +1100,8 @@ + { + UInt32 *rdrf, rdrfLen, *rmdr, rmdrLen, *rmda, zero, size; + +- zero = htonl(0); // Okay, this is silly ??? +- rate = htonl(rate); ++ zero = bswap_32(0); // Okay, this is silly ??? ++ rate = bswap_32(rate); + + // Make the RDRF + size = ::strlen(url) + 1; +@@ -1109,8 +1110,8 @@ + if( rdrf == NULL ) + return NULL; + +- rdrfLen = htonl(rdrfLen); +- size = htonl(size); ++ rdrfLen = bswap_32(rdrfLen); ++ size = bswap_32(size); + + ::memcpy(&rdrf[0], &rdrfLen, 4); + ::memcpy(&rdrf[1], "rdrf", 4); +@@ -1125,7 +1126,7 @@ + if( rmdr == NULL ) + return NULL; + +- rmdrLen = htonl(rmdrLen); ++ rmdrLen = bswap_32(rmdrLen); + + ::memcpy(&rmdr[0], &rmdrLen, 4); + ::memcpy(&rmdr[1], "rmdr", 4); +@@ -1134,22 +1135,22 @@ + + // Make the RMDA + +- *rmdaLen = ntohl(rdrfLen) + ntohl(rmdrLen) + 8; ++ *rmdaLen = bswap_32(rdrfLen) + bswap_32(rmdrLen) + 8; + rmda = NEW UInt32[*rmdaLen]; + if( rmda == NULL ) + return NULL; + +- *rmdaLen = htonl(*rmdaLen); ++ *rmdaLen = bswap_32(*rmdaLen); + + ::memcpy(&rmda[0], rmdaLen, 4); + ::memcpy(&rmda[1], "rmda", 4); +- ::memcpy((char *)rmda + 8, rmdr, ntohl(rmdrLen)); +- ::memcpy((char *)rmda + 8 + ntohl(rmdrLen), rdrf, ntohl(rdrfLen)); ++ ::memcpy((char *)rmda + 8, rmdr, bswap_32(rmdrLen)); ++ ::memcpy((char *)rmda + 8 + bswap_32(rmdrLen), rdrf, bswap_32(rdrfLen)); + + delete rdrf; + delete rmdr; + +- *rmdaLen = ntohl(*rmdaLen); ++ *rmdaLen = bswap_32(*rmdaLen); + + // rmda needs to be deleted by the calling function + return rmda; +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSProxyModule/QTSSProxyModule.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSProxyModule/QTSSProxyModule.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSProxyModule/QTSSProxyModule.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSProxyModule/QTSSProxyModule.cpp 2008-05-30 23:31:46.000000000 +0200 +@@ -36,6 +36,7 @@ + #ifndef __Win32__ + // + // For gethostbyname ++#include + #include + #endif + +@@ -357,7 +358,7 @@ + + UInt32 theIPAddr = 0; + if (theHostent != NULL) +- theIPAddr = ntohl(*(UInt32*)(theHostent->h_addr_list[0])); ++ theIPAddr = bswap_32(*(UInt32*)(theHostent->h_addr_list[0])); + else + theIPAddr = SocketUtils::ConvertStringToAddr(theDNSName); + +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/QTSSReflectorModule.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/QTSSReflectorModule.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/QTSSReflectorModule.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/QTSSReflectorModule.cpp 2008-05-30 23:32:02.000000000 +0200 +@@ -31,6 +31,7 @@ + + */ + ++#include + #include "QTSSReflectorModule.h" + #include "QTSSModuleUtils.h" + #include "ReflectorSession.h" +@@ -654,7 +655,7 @@ + + UInt16 packetDataLen; + memcpy(&packetDataLen,&packetData[2],2); +- packetDataLen = ntohs(packetDataLen); ++ packetDataLen = bswap_16(packetDataLen); + + char* rtpPacket = &packetData[4]; + +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorSession.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorSession.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorSession.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorSession.cpp 2008-05-30 23:32:26.000000000 +0200 +@@ -32,6 +32,7 @@ + */ + + ++#include + #include "ReflectorSession.h" + #include "RTCPPacket.h" + #include "SocketUtils.h" +@@ -283,7 +284,7 @@ + char theIPAddrBuf[20]; + StrPtrLen theIPAddr(theIPAddrBuf, 20); + struct in_addr theAddr; +- theAddr.s_addr = htonl(fSourceInfo->GetStreamInfo(0)->fSrcIPAddr); ++ theAddr.s_addr = bswap_32(fSourceInfo->GetStreamInfo(0)->fSrcIPAddr); + SocketUtils::ConvertAddrToString(theAddr, &theIPAddr); + fFormatter.Put(theIPAddr); + } +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorStream.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorStream.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorStream.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorStream.cpp 2008-05-30 23:32:33.000000000 +0200 +@@ -31,6 +31,7 @@ + + */ + ++#include + #include "ReflectorStream.h" + #include "QTSSModuleUtils.h" + #include "OSMemory.h" +@@ -162,31 +163,31 @@ + + //write the RR (just header + ssrc) + UInt32* theRRWriter = (UInt32*)&fReceiverReportBuffer[0]; +- *theRRWriter = htonl(0x80c90001); ++ *theRRWriter = bswap_32(0x80c90001); + theRRWriter++; +- *theRRWriter = htonl(theSsrc); ++ *theRRWriter = bswap_32(theSsrc); + theRRWriter++; + + //SDES length is the length of the CName, plus 2 32bit words, minus 1 +- *theRRWriter = htonl(0x81ca0000 + (cNameLen >> 2) + 1); ++ *theRRWriter = bswap_32(0x81ca0000 + (cNameLen >> 2) + 1); + theRRWriter++; +- *theRRWriter = htonl(theSsrc); ++ *theRRWriter = bswap_32(theSsrc); + theRRWriter++; + ::memcpy(theRRWriter, theTempCName, cNameLen); + theRRWriter += cNameLen >> 2; + + //APP packet format, QTSS specific stuff +- *theRRWriter = htonl(0x80cc0008); ++ *theRRWriter = bswap_32(0x80cc0008); + theRRWriter++; +- *theRRWriter = htonl(theSsrc); ++ *theRRWriter = bswap_32(theSsrc); + theRRWriter++; +- *theRRWriter = htonl(FOUR_CHARS_TO_INT('Q','T','S','S')); ++ *theRRWriter = bswap_32(FOUR_CHARS_TO_INT('Q','T','S','S')); + theRRWriter++; +- *theRRWriter = htonl(0); ++ *theRRWriter = bswap_32(0); + theRRWriter++; +- *theRRWriter = htonl(0x00000004); ++ *theRRWriter = bswap_32(0x00000004); + theRRWriter++; +- *theRRWriter = htonl(0x6579000c); ++ *theRRWriter = bswap_32(0x6579000c); + theRRWriter++; + + fEyeLocation = theRRWriter; +@@ -474,11 +475,11 @@ + + UInt32 theEyeCount = this->GetEyeCount(); + UInt32* theEyeWriter = fEyeLocation; +- *theEyeWriter = htonl(theEyeCount) & 0x7fffffff;//no idea why we do this! ++ *theEyeWriter = bswap_32(theEyeCount) & 0x7fffffff;//no idea why we do this! + theEyeWriter++; +- *theEyeWriter = htonl(theEyeCount) & 0x7fffffff; ++ *theEyeWriter = bswap_32(theEyeCount) & 0x7fffffff; + theEyeWriter++; +- *theEyeWriter = htonl(0) & 0x7fffffff; ++ *theEyeWriter = bswap_32(0) & 0x7fffffff; + + //send the packet to the multicast RTCP addr & port for this stream + (void)fSockets->GetSocketB()->SendTo(fDestRTCPAddr, fDestRTCPPort, fReceiverReportBuffer, fReceiverReportSize); +@@ -707,7 +708,7 @@ + + //The RTP seq number is the second short of the packet + UInt16* seqNumPtr = (UInt16*)inPacket->Ptr; +- return ntohs(seqNumPtr[1]); ++ return bswap_16(seqNumPtr[1]); + } + + +@@ -1460,7 +1461,7 @@ + if (theSender == NULL) + { + //UInt16* theSeqNumberP = (UInt16*)thePacket->fPacketPtr.Ptr; +- //qtss_printf("ReflectorSocket::ProcessPacket no sender found for packet! sequence number=%d\n",ntohs(theSeqNumberP[1])); ++ //qtss_printf("ReflectorSocket::ProcessPacket no sender found for packet! sequence number=%d\n",bswap_16(theSeqNumberP[1])); + fFreeQueue.EnQueue(&thePacket->fQueueElem); // don't process the packet + done = true; + break; +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorStream.h DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorStream.h +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/ReflectorStream.h 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/ReflectorStream.h 2008-05-30 23:32:36.000000000 +0200 +@@ -37,6 +37,7 @@ + #ifndef _REFLECTOR_STREAM_H_ + #define _REFLECTOR_STREAM_H_ + ++#include + #include "QTSS.h" + + #include "IdleTask.h" +@@ -121,12 +122,12 @@ + + UInt32* theSsrcPtr = (UInt32*)fPacketPtr.Ptr; + if (isRTCP)// RTCP +- return ntohl(theSsrcPtr[1]); ++ return bswap_32(theSsrcPtr[1]); + + if (fPacketPtr.Len < 12) + return 0; + +- return ntohl(theSsrcPtr[2]); // RTP SSRC ++ return bswap_32(theSsrcPtr[2]); // RTP SSRC + } + + UInt32 ReflectorPacket::GetPacketRTPTime() +@@ -138,13 +139,13 @@ + //The RTP timestamp number is the second long of the packet + if (fPacketPtr.Ptr == NULL || fPacketPtr.Len < 8) + return 0; +- timestamp = ntohl( ((UInt32*)fPacketPtr.Ptr)[1]); ++ timestamp = bswap_32( ((UInt32*)fPacketPtr.Ptr)[1]); + } + else + { + if (fPacketPtr.Ptr == NULL || fPacketPtr.Len < 20) + return 0; +- timestamp = ntohl( ((UInt32*)fPacketPtr.Ptr)[4]); ++ timestamp = bswap_32( ((UInt32*)fPacketPtr.Ptr)[4]); + } + return timestamp; + } +@@ -156,7 +157,7 @@ + if (fPacketPtr.Ptr == NULL || fPacketPtr.Len < 4 || fIsRTCP) + return 0; + +- UInt16 sequence = ntohs( ((UInt16*)fPacketPtr.Ptr)[1]); //The RTP sequenc number is the second short of the packet ++ UInt16 sequence = bswap_16( ((UInt16*)fPacketPtr.Ptr)[1]); //The RTP sequenc number is the second short of the packet + return sequence; + } + +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RelayOutput.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RelayOutput.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RelayOutput.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RelayOutput.cpp 2008-05-30 23:32:47.000000000 +0200 +@@ -31,6 +31,7 @@ + + */ + ++#include + #include "RelayOutput.h" + + #include "OSMemory.h" +@@ -234,7 +235,7 @@ + char theIPAddrBuf[20]; + StrPtrLen theIPAddr(theIPAddrBuf, 20); + struct in_addr theAddr; +- theAddr.s_addr = htonl(fOutputInfo.fDestAddr); ++ theAddr.s_addr = bswap_32(fOutputInfo.fDestAddr); + SocketUtils::ConvertAddrToString(theAddr, &theIPAddr); + + // Begin writing the HTML +@@ -538,14 +539,14 @@ + StrPtrLen theIPAddr(theIPAddrBuf, 20); + + struct in_addr theDestAddr; // output destination address +- theDestAddr.s_addr = htonl(fOutputInfo.fDestAddr); ++ theDestAddr.s_addr = bswap_32(fOutputInfo.fDestAddr); + SocketUtils::ConvertAddrToString(theDestAddr, &theIPAddr); + + theErr = QTSS_SetValue (fRelayOutputObject, sOutputDestAddr, 0, (void*)theIPAddr.Ptr, theIPAddr.Len); + Assert(theErr == QTSS_NoErr); + + struct in_addr theLocalAddr; // output local address +- theLocalAddr.s_addr = htonl(fOutputInfo.fLocalAddr); ++ theLocalAddr.s_addr = bswap_32(fOutputInfo.fLocalAddr); + SocketUtils::ConvertAddrToString(theLocalAddr, &theIPAddr); + + theErr = QTSS_SetValue (fRelayOutputObject, sOutputLocalAddr, 0, (void*)theIPAddr.Ptr, theIPAddr.Len); +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RelaySession.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RelaySession.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RelaySession.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RelaySession.cpp 2008-05-30 23:33:05.000000000 +0200 +@@ -32,6 +32,7 @@ + */ + + ++#include + #include "RelaySession.h" + #include "QTSSModuleUtils.h" + #include "SocketUtils.h" +@@ -189,14 +190,14 @@ + StrPtrLen theIPAddr(theIPAddrBuf, 20); + + struct in_addr theSrcAddr; // source ip address +- theSrcAddr.s_addr = htonl(inInfo->GetStreamInfo(0)->fSrcIPAddr); ++ theSrcAddr.s_addr = bswap_32(inInfo->GetStreamInfo(0)->fSrcIPAddr); + SocketUtils::ConvertAddrToString(theSrcAddr, &theIPAddr); + + theErr = QTSS_SetValue (fRelaySessionObject, sSourceIPAddr, 0, (void*)theIPAddr.Ptr, theIPAddr.Len); + Assert(theErr == QTSS_NoErr); + + struct in_addr theDestAddr; // dest (of source) ip address +- theDestAddr.s_addr = htonl(inInfo->GetStreamInfo(0)->fDestIPAddr); ++ theDestAddr.s_addr = bswap_32(inInfo->GetStreamInfo(0)->fDestIPAddr); + SocketUtils::ConvertAddrToString(theDestAddr, &theIPAddr); + + theErr = QTSS_SetValue (fRelaySessionObject, sSourceInIPAddr, 0, (void*)theIPAddr.Ptr, theIPAddr.Len); +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RTPSessionOutput.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RTPSessionOutput.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RTPSessionOutput.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RTPSessionOutput.cpp 2008-05-30 23:34:26.000000000 +0200 +@@ -31,6 +31,8 @@ + */ + + ++#include ++#include + #include "RTPSessionOutput.h" + #include "ReflectorStream.h" + +@@ -442,18 +444,18 @@ + //printf("rtptime offset time =%f in scale =%"_U32BITARG_"\n", rtpTimeFromStart, rtpTimeFromStartInScale ); + + theReport += 2; // point to the rtp time stamp of "now" synched and scaled in stream time +- *theReport = htonl(baseTimeStamp + rtpTimeFromStartInScale); ++ *theReport = bswap_32(baseTimeStamp + rtpTimeFromStartInScale); + + theLen = sizeof(UInt32); + UInt32 packetCount = 0; + (void) QTSS_GetValue(*theStreamPtr, sStreamPacketCountAttr, 0, &packetCount,&theLen); + theReport += 1; // point to the rtp packets sent +- *theReport = htonl(ntohl(*theReport) * 2); ++ *theReport = bswap_32(bswap_32(*theReport) * 2); + + UInt32 byteCount = 0; + (void) QTSS_GetValue(*theStreamPtr, sStreamByteCountAttr, 0, &byteCount,&theLen); + theReport += 1; // point to the rtp payload bytes sent +- *theReport = htonl(ntohl(*theReport) * 2); ++ *theReport = bswap_32(bswap_32(*theReport) * 2); + + return QTSS_NoErr; + } +@@ -667,7 +669,7 @@ + + //The RTP seq number is the second short of the packet + UInt16* seqNumPtr = (UInt16*)inPacket->Ptr; +- return ntohs(seqNumPtr[1]); ++ return bswap_16(seqNumPtr[1]); + } + + void RTPSessionOutput::SetPacketSeqNumber(StrPtrLen* inPacket, UInt16 inSeqNumber) +@@ -677,7 +679,7 @@ + + //The RTP seq number is the second short of the packet + UInt16* seqNumPtr = (UInt16*)inPacket->Ptr; +- seqNumPtr[1] = htons(inSeqNumber); ++ seqNumPtr[1] = bswap_16(inSeqNumber); + } + + // this routine is not used +diff -ur DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RTSPSourceInfo.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RTSPSourceInfo.cpp +--- DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSReflectorModule/RTSPSourceInfo.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/APIModules/QTSSReflectorModule/RTSPSourceInfo.cpp 2008-05-30 23:34:07.000000000 +0200 +@@ -31,6 +31,7 @@ + + */ + ++#include + #include "RTSPSourceInfo.h" + #include "StringParser.h" + #include "SDPSourceInfo.h" +@@ -384,7 +385,7 @@ + StrPtrLen temp(buff); + + struct in_addr theIPAddr; +- theIPAddr.s_addr = htonl(ipAddr); ++ theIPAddr.s_addr = bswap_32(ipAddr); + SocketUtils::ConvertAddrToString(theIPAddr, &temp); + + qtss_sprintf(ipStr, "c=IN IP4 %s", buff); +diff -ur DarwinStreamingSrvr6.0.3-Source/Buildit DarwinStreamingSrvr6.0.3-Source.x86_64/Buildit +--- DarwinStreamingSrvr6.0.3-Source/Buildit 2008-03-26 01:42:48.000000000 +0100 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Buildit 2008-05-31 10:40:58.000000000 +0200 +@@ -65,14 +65,14 @@ + case $PLAT in + + Linux.ppc) +- echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" ++ echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" + CPLUS=gcc + CCOMP=gcc + LINKER='gcc' + MAKE=make + + COMPILER_FLAGS="-D_REENTRANT -D__USE_POSIX -D__linuxppc__ -pipe" +- INCLUDE_FLAG="-include" ++ INCLUDE_FLAG="-include" + + CORE_LINK_LIBS="-lpthread -ldl -lstdc++ -lm -lcrypt" + +@@ -85,16 +85,39 @@ + fi + ;; + ++ Linux.i386 | \ ++ Linux.i486 | \ + Linux.i586 | \ + Linux.i686) +- echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" ++ echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" + CPLUS=gcc + CCOMP=gcc + LINKER='gcc' + MAKE=make + + COMPILER_FLAGS="-D_REENTRANT -D__USE_POSIX -D__linux__ -pipe" +- INCLUDE_FLAG="-include" ++ INCLUDE_FLAG="-include" ++ ++ CORE_LINK_LIBS="-lpthread -ldl -lstdc++ -lm -lcrypt" ++ ++ SHARED=-shared ++ MODULE_LIBS= ++ ++ if [ -f /usr/include/socketbits.h ]; then ++ NEED_SOCKETBITS=1 ++ export NEED_SOCKETBITS ++ fi ++ ;; ++ ++ Linux.x86_64) ++ echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" ++ CPLUS=gcc ++ CCOMP=gcc ++ LINKER='gcc' ++ MAKE=make ++ ++ COMPILER_FLAGS="-D_REENTRANT -D__USE_POSIX -D__linux__ -pipe -fPIC" ++ INCLUDE_FLAG="-include" + + CORE_LINK_LIBS="-lpthread -ldl -lstdc++ -lm -lcrypt" + +@@ -108,14 +131,14 @@ + ;; + + Linux.mips) +- echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" ++ echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" + CPLUS=gcc + CCOMP=gcc + LINKER='egcs' + MAKE=make + + COMPILER_FLAGS="-D_REENTRANT -D__linux__ -Wno-multichar -pipe" +- INCLUDE_FLAG="-include" ++ INCLUDE_FLAG="-include" + + CORE_LINK_LIBS="-lpthread -ldl -lm -lcrypt" + +@@ -129,14 +152,14 @@ + ;; + + FreeBSD.i386) +- echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" ++ echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" + CPLUS=gcc + CCOMP=gcc + LINKER="gcc" + MAKE=make + + COMPILER_FLAGS= +- INCLUDE_FLAG="-include" ++ INCLUDE_FLAG="-include" + + CORE_LINK_LIBS="-pthread -lm -lcrypt" + +@@ -147,14 +170,14 @@ + # SunOS.sun4m | \ + # SunOS.sun4u) + SunOS.*) +- echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" ++ echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" + CPLUS=g++ + CCOMP=gcc + LINKER="g++" + MAKE=make + + COMPILER_FLAGS="-D__solaris__ -D_REENTRANT -DFD_SETSIZE=65536 -L/usr/local/lib -R/usr/local/lib" +- INCLUDE_FLAG="-include" ++ INCLUDE_FLAG="-include" + + CORE_LINK_LIBS="-lpthread -ldl -lsocket -lnsl -lresolv -lm -lcrypt -lstdc++" + +@@ -163,9 +186,9 @@ + ;; + + IRIX*.*) +-# IRIX with MipsPro compiler +-# Change all references of Makefile.POSIX below to Makefile.IRIX +- echo "Configuring for the "$OSNAME" "$HARDWARENAME" SGI platform" ++ # IRIX with MipsPro compiler ++ # Change all references of Makefile.POSIX below to Makefile.IRIX ++ echo "Configuring for the "$OSNAME" "$HARDWARENAME" SGI platform" + CPLUS=CC + CCOMP=cc + LINKER="CC" +@@ -179,31 +202,31 @@ + MODULE_LIBS= + ;; + +- HP-UX.*) +- echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" +- CPLUS=gcc +- CCOMP=gcc +- LINKER=gcc +- MAKE=make ++ HP-UX.*) ++ echo "Configuring for the "$OSNAME" "$HARDWARENAME" platform" ++ CPLUS=gcc ++ CCOMP=gcc ++ LINKER=gcc ++ MAKE=make + +- COMPILER_FLAGS="-D__hpux__ -g -fPIC" +- INCLUDE_FLAG="-include" ++ COMPILER_FLAGS="-D__hpux__ -g -fPIC" ++ INCLUDE_FLAG="-include" + +- CORE_LINK_LIBS="-lpthread -lnsl -lm -lcrypt -lstdc++" ++ CORE_LINK_LIBS="-lpthread -lnsl -lm -lcrypt -lstdc++" + +- SHARED=-shared +- MODULE_LIBS="-lgcc -lstdc++" +- ;; ++ SHARED=-shared ++ MODULE_LIBS="-lgcc -lstdc++" ++ ;; + + OSF1.alpha) +- echo "Configuring for the "$OSNAME" "$HARDWARENAME" Tru64 UNIX platform" ++ echo "Configuring for the "$OSNAME" "$HARDWARENAME" Tru64 UNIX platform" + CPLUS=`pwd`/my_tru64_cxx + CCOMP=`pwd`/my_tru64_cc + LINKER="cxx" + MAKE=/usr/local/bin/make + + COMPILER_FLAGS="-D__osf__ -DTRUCLUSTER -pthread" +- INCLUDE_FLAG="-FI" ++ INCLUDE_FLAG="-FI" + + CORE_LINK_LIBS="-lpthread -lclu -lm" + +@@ -213,7 +236,7 @@ + + "Darwin.i386" | \ + "Darwin.Power Macintosh") +- echo "Configuring for "$OSNAME" on "$HARDWARENAME". This is an OS X build of the QuickTimeStreamingServer." ++ echo "Configuring for "$OSNAME" on "$HARDWARENAME". This is an OS X build of the QuickTimeStreamingServer." + + ;; + +@@ -227,7 +250,7 @@ + MAKE=make + + COMPILER_FLAGS=-D__linux__ +- INCLUDE_FLAG="-include" ++ INCLUDE_FLAG="-include" + + CORE_LINK_LIBS="-lpthread -ldl -lm -lcrypt" + +@@ -338,7 +361,11 @@ + echo Building StreamingServer for $PLAT with $CPLUS + cd .. + +- $MAKE -f Makefile.POSIX $* ++ if [ "$*" = "clean" ] ; then ++ $MAKE -B -f Makefile.POSIX $* ++ else ++ $MAKE -f Makefile.POSIX $* ++ fi + + echo Building RefMovieModule for $PLAT with $CPLUS + cd APIModules/QTSSRefMovieModule/ +diff -ur DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/OSHeaders.h +--- DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h 2008-05-24 02:05:15.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/OSHeaders.h 2008-05-31 10:30:15.000000000 +0200 +@@ -122,16 +122,16 @@ + #elif __linux__ || __linuxppc__ || __FreeBSD__ + /* Defines */ + #define _64BITARG_ "q" +- #define _S64BITARG_ "lld" +- #define _U64BITARG_ "llu" ++ #define _S32BITARG_ "d" ++ #define _U32BITARG_ "u" + #if __LP64__ +- #define _S32BITARG_ "d" +- #define _U32BITARG_ "u" ++ #define _S64BITARG_ "ld" ++ #define _U64BITARG_ "lu" + #define _SPOINTERSIZEARG_ _S64BITARG_ + #define _UPOINTERSIZEARG_ _U64BITARG_ + #else +- #define _S32BITARG_ "d" +- #define _U32BITARG_ "u" ++ #define _S64BITARG_ "lld" ++ #define _U64BITARG_ "llu" + #define _SPOINTERSIZEARG_ _S32BITARG_ + #define _UPOINTERSIZEARG_ _U32BITARG_ + #endif +@@ -181,14 +181,14 @@ + + #define TW0_CHARS_TO_INT( c1, c2 ) ( c1 << 8 | c2 ) + +- #define kSInt16_Max USHRT_MAX +- #define kUInt16_Max USHRT_MAX ++ #define kSInt16_Max (SInt16) SHRT_MAX ++ #define kUInt16_Max (UInt16) USHRT_MAX + +- #define kSInt32_Max LONG_MAX +- #define kUInt32_Max ULONG_MAX ++ #define kSInt32_Max (SInt32) LONG_MAX ++ #define kUInt32_Max (UInt32) ULONG_MAX + +- #define kSInt64_Max LONG_LONG_MAX +- #define kUInt64_Max ULONG_LONG_MAX ++ #define kSInt64_Max (SInt64) LONG_LONG_MAX ++ #define kUInt64_Max (UInt64) ULONG_LONG_MAX + + #elif __Win32__ + +diff -ur DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/Socket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/Socket.cpp +--- DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/Socket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/Socket.cpp 2008-05-30 23:35:40.000000000 +0200 +@@ -31,6 +31,7 @@ + + */ + ++#include + #include + + #ifndef __Win32__ +@@ -186,8 +187,8 @@ + socklen_t len = sizeof(fLocalAddr); + ::memset(&fLocalAddr, 0, sizeof(fLocalAddr)); + fLocalAddr.sin_family = AF_INET; +- fLocalAddr.sin_port = htons(port); +- fLocalAddr.sin_addr.s_addr = htonl(addr); ++ fLocalAddr.sin_port = bswap_16(port); ++ fLocalAddr.sin_addr.s_addr = bswap_32(addr); + + int err; + +@@ -229,7 +230,7 @@ + { + for (UInt32 x = 0; x < SocketUtils::GetNumIPAddrs(); x++) + { +- if (SocketUtils::GetIPAddr(x) == ntohl(fLocalAddr.sin_addr.s_addr)) ++ if (SocketUtils::GetIPAddr(x) == bswap_32(fLocalAddr.sin_addr.s_addr)) + { + fLocalAddrStrPtr = SocketUtils::GetIPAddrStr(x); + break; +@@ -244,7 +245,7 @@ + fLocalAddrBuffer[0]=0; + fLocalAddrStrPtr = &fLocalAddrStr; + struct in_addr theAddr; +- theAddr.s_addr =ntohl(fLocalAddr.sin_addr.s_addr); ++ theAddr.s_addr =bswap_32(fLocalAddr.sin_addr.s_addr); + SocketUtils::ConvertAddrToString(theAddr, &fLocalAddrStr); + + printf("Socket::GetLocalAddrStr Search IPs failed, numIPs=%d\n",SocketUtils::GetNumIPAddrs()); +@@ -270,7 +271,7 @@ + { + for (UInt32 x = 0; x < SocketUtils::GetNumIPAddrs(); x++) + { +- if (SocketUtils::GetIPAddr(x) == ntohl(fLocalAddr.sin_addr.s_addr)) ++ if (SocketUtils::GetIPAddr(x) == bswap_32(fLocalAddr.sin_addr.s_addr)) + { + fLocalDNSStrPtr = SocketUtils::GetDNSNameStr(x); + break; +@@ -290,7 +291,7 @@ + { + if (fPortStr.Len == kPortBufSizeInBytes) + { +- int temp = ntohs(fLocalAddr.sin_port); ++ int temp = bswap_16(fLocalAddr.sin_port); + qtss_sprintf(fPortBuffer, "%d", temp); + fPortStr.Len = ::strlen(fPortBuffer); + } +diff -ur DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/Socket.h DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/Socket.h +--- DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/Socket.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/Socket.h 2008-05-30 23:35:35.000000000 +0200 +@@ -37,6 +37,7 @@ + #define __SOCKET_H__ + + #ifndef __Win32__ ++#include + #include + #endif + +@@ -94,8 +95,8 @@ + Bool16 IsBound() { return (Bool16) (fState & kBound); } + + //If the socket is bound, you may find out to which addr it is bound +- UInt32 GetLocalAddr() { return ntohl(fLocalAddr.sin_addr.s_addr); } +- UInt16 GetLocalPort() { return ntohs(fLocalAddr.sin_port); } ++ UInt32 GetLocalAddr() { return bswap_32(fLocalAddr.sin_addr.s_addr); } ++ UInt16 GetLocalPort() { return bswap_16(fLocalAddr.sin_port); } + + StrPtrLen* GetLocalAddrStr(); + StrPtrLen* GetLocalPortStr(); +diff -ur DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/SocketUtils.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/SocketUtils.cpp +--- DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/SocketUtils.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/SocketUtils.cpp 2008-05-30 23:34:48.000000000 +0200 +@@ -32,6 +32,7 @@ + + */ + ++#include + #include + + #ifndef __Win32__ +@@ -123,7 +124,7 @@ + char* theAddrStr = ::inet_ntoa(sockaddr->sin_addr); + + //store the IP addr +- sIPAddrInfoArray[addrArrayIndex].fIPAddr = ntohl(sockaddr->sin_addr.s_addr); ++ sIPAddrInfoArray[addrArrayIndex].fIPAddr = bswap_32(sockaddr->sin_addr.s_addr); + + //store the IP addr as a string + sIPAddrInfoArray[addrArrayIndex].fIPAddrStr.Len = ::strlen(theAddrStr); +@@ -281,7 +282,7 @@ + char* theAddrStr = ::inet_ntoa(theAddr->sin_addr); + + //store the IP addr +- sIPAddrInfoArray[currentIndex].fIPAddr = ntohl(theAddr->sin_addr.s_addr); ++ sIPAddrInfoArray[currentIndex].fIPAddr = bswap_32(theAddr->sin_addr.s_addr); + + //store the IP addr as a string + sIPAddrInfoArray[currentIndex].fIPAddrStr.Len = ::strlen(theAddrStr); +@@ -438,7 +439,7 @@ + char* theAddrStr = ::inet_ntoa(sin.sin_addr); + + //store the IP addr +- sIPAddrInfoArray[currentIndex].fIPAddr = ntohl(sin.sin_addr.s_addr); ++ sIPAddrInfoArray[currentIndex].fIPAddr = bswap_32(sin.sin_addr.s_addr); + + //store the IP addr as a string + sIPAddrInfoArray[currentIndex].fIPAddrStr.Len = ::strlen(theAddrStr); +@@ -483,7 +484,7 @@ + char* theAddrStr = ::inet_ntoa(addrPtr->sin_addr); + + //store the IP addr +- sIPAddrInfoArray[currentIndex].fIPAddr = ntohl(addrPtr->sin_addr.s_addr); ++ sIPAddrInfoArray[currentIndex].fIPAddr = bswap_32(addrPtr->sin_addr.s_addr); + + //store the IP addr as a string + sIPAddrInfoArray[currentIndex].fIPAddrStr.Len = ::strlen(theAddrStr); +@@ -600,6 +601,6 @@ + if (inAddrStr == NULL) + return 0; + +- return ntohl(::inet_addr(inAddrStr)); ++ return bswap_32(::inet_addr(inAddrStr)); + } + +diff -ur DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/SocketUtils.h DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/SocketUtils.h +--- DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/SocketUtils.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/SocketUtils.h 2008-05-30 23:34:42.000000000 +0200 +@@ -34,6 +34,7 @@ + #define __SOCKETUTILS_H__ + + #ifndef __Win32__ ++#include + #include + #include + #include +diff -ur DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/TCPSocket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/TCPSocket.cpp +--- DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/TCPSocket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/TCPSocket.cpp 2008-05-30 23:35:46.000000000 +0200 +@@ -32,6 +32,7 @@ + */ + + #ifndef __Win32__ ++#include + #include + #include + #include +@@ -100,8 +101,8 @@ + { + ::memset(&fRemoteAddr, 0, sizeof(fRemoteAddr)); + fRemoteAddr.sin_family = AF_INET; /* host byte order */ +- fRemoteAddr.sin_port = htons(inRemotePort); /* short, network byte order */ +- fRemoteAddr.sin_addr.s_addr = htonl(inRemoteAddr); ++ fRemoteAddr.sin_port = bswap_16(inRemotePort); /* short, network byte order */ ++ fRemoteAddr.sin_addr.s_addr = bswap_32(inRemoteAddr); + + /* don't forget to error check the connect()! */ + int err = ::connect(fFileDesc, (sockaddr *)&fRemoteAddr, sizeof(fRemoteAddr)); +diff -ur DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/TCPSocket.h DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/TCPSocket.h +--- DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/TCPSocket.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/TCPSocket.h 2008-05-30 23:35:51.000000000 +0200 +@@ -35,6 +35,7 @@ + #ifndef __TCPSOCKET_H__ + #define __TCPSOCKET_H__ + ++#include + #include + #include + #include "SafeStdLib.h" +@@ -81,8 +82,8 @@ + //ACCESSORS: + //Returns NULL if not currently available. + +- UInt32 GetRemoteAddr() { return ntohl(fRemoteAddr.sin_addr.s_addr); } +- UInt16 GetRemotePort() { return ntohs(fRemoteAddr.sin_port); } ++ UInt32 GetRemoteAddr() { return bswap_32(fRemoteAddr.sin_addr.s_addr); } ++ UInt16 GetRemotePort() { return bswap_16(fRemoteAddr.sin_port); } + //This function is NOT thread safe! + StrPtrLen* GetRemoteAddrStr(); + +diff -ur DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/UDPSocket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/UDPSocket.cpp +--- DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/UDPSocket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/CommonUtilitiesLib/UDPSocket.cpp 2008-05-30 23:36:06.000000000 +0200 +@@ -32,6 +32,7 @@ + */ + + #ifndef __Win32__ ++#include + #include + #include + +@@ -74,8 +75,8 @@ + + struct sockaddr_in theRemoteAddr; + theRemoteAddr.sin_family = AF_INET; +- theRemoteAddr.sin_port = htons(inRemotePort); +- theRemoteAddr.sin_addr.s_addr = htonl(inRemoteAddr); ++ theRemoteAddr.sin_port = bswap_16(inRemotePort); ++ theRemoteAddr.sin_addr.s_addr = bswap_32(inRemoteAddr); + + #ifdef __sgi__ + int theErr = ::sendto(fFileDesc, inBuffer, inLength, 0, (sockaddr*)&theRemoteAddr, sizeof(theRemoteAddr)); +@@ -112,8 +113,8 @@ + if (theRecvLen == -1) + return (OS_Error)OSThread::GetErrno(); + +- *outRemoteAddr = ntohl(fMsgAddr.sin_addr.s_addr); +- *outRemotePort = ntohs(fMsgAddr.sin_port); ++ *outRemoteAddr = bswap_32(fMsgAddr.sin_addr.s_addr); ++ *outRemotePort = bswap_16(fMsgAddr.sin_port); + Assert(theRecvLen >= 0); + *outRecvLen = (UInt32)theRecvLen; + return OS_NoErr; +@@ -125,10 +126,10 @@ + UInt32 localAddr = fLocalAddr.sin_addr.s_addr; // Already in network byte order + + #if __solaris__ +- if( localAddr == htonl(INADDR_ANY) ) +- localAddr = htonl(SocketUtils::GetIPAddr(0)); ++ if( localAddr == bswap_32(INADDR_ANY) ) ++ localAddr = bswap_32(SocketUtils::GetIPAddr(0)); + #endif +- theMulti.imr_multiaddr.s_addr = htonl(inRemoteAddr); ++ theMulti.imr_multiaddr.s_addr = bswap_32(inRemoteAddr); + theMulti.imr_interface.s_addr = localAddr; + int err = setsockopt(fFileDesc, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&theMulti, sizeof(theMulti)); + //AssertV(err == 0, OSThread::GetErrno()); +@@ -166,8 +167,8 @@ + OS_Error UDPSocket::LeaveMulticast(UInt32 inRemoteAddr) + { + struct ip_mreq theMulti; +- theMulti.imr_multiaddr.s_addr = htonl(inRemoteAddr); +- theMulti.imr_interface.s_addr = htonl(fLocalAddr.sin_addr.s_addr); ++ theMulti.imr_multiaddr.s_addr = bswap_32(inRemoteAddr); ++ theMulti.imr_interface.s_addr = bswap_32(fLocalAddr.sin_addr.s_addr); + int err = setsockopt(fFileDesc, IPPROTO_IP, IP_DROP_MEMBERSHIP, (char*)&theMulti, sizeof(theMulti)); + if (err == -1) + return (OS_Error)OSThread::GetErrno(); + +diff -ur DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source.x86_64/Makefile.POSIX +--- DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX 2008-05-24 07:19:34.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Makefile.POSIX 2008-05-31 11:17:29.000000000 +0200 +@@ -150,6 +150,7 @@ + + clean: + rm -f $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) ++ rm -f DarwinStreamingServer + + .SUFFIXES: .cpp .c .o + +diff -ur DarwinStreamingSrvr6.0.3-Source/MP3Broadcaster/BroadcasterMain.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/MP3Broadcaster/BroadcasterMain.cpp +--- DarwinStreamingSrvr6.0.3-Source/MP3Broadcaster/BroadcasterMain.cpp 2008-05-06 01:28:57.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/MP3Broadcaster/BroadcasterMain.cpp 2008-05-30 23:00:30.000000000 +0200 +@@ -216,7 +216,7 @@ + + struct sigaction act; + +-#if defined(sun) || defined(i386) || defined(__MacOSX__) || defined(__sgi__) || defined(__osf__) || defined(__hpux__) || defined(__linuxppc__) ++#if defined(sun) || defined(i386) || defined(__MacOSX__) || defined(__sgi__) || defined(__osf__) || defined(__hpux__) || defined(__linuxppc__) || defined(__linux__) + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = (void(*)(int))&SignalEventHandler; +diff -ur DarwinStreamingSrvr6.0.3-Source/MP3Broadcaster/MP3Broadcaster.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/MP3Broadcaster/MP3Broadcaster.cpp +--- DarwinStreamingSrvr6.0.3-Source/MP3Broadcaster/MP3Broadcaster.cpp 2008-05-06 01:28:57.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/MP3Broadcaster/MP3Broadcaster.cpp 2008-05-30 23:36:26.000000000 +0200 +@@ -23,6 +23,7 @@ + * + */ + ++#include + #include "MP3Broadcaster.h" + #include "MP3MetaInfoUpdater.h" + #include "StringTranslator.h" +@@ -874,7 +875,7 @@ + { + struct hostent* theHostent = ::gethostbyname(mIPAddr); + if (theHostent != NULL) +- addr = ntohl(*(UInt32*)(theHostent->h_addr_list[0])); ++ addr = bswap_32(*(UInt32*)(theHostent->h_addr_list[0])); + else + qtss_printf("Couldn't resolve address %s\n", mIPAddr); + } +diff -ur DarwinStreamingSrvr6.0.3-Source/MP3Broadcaster/MP3FileBroadcaster.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/MP3Broadcaster/MP3FileBroadcaster.cpp +--- DarwinStreamingSrvr6.0.3-Source/MP3Broadcaster/MP3FileBroadcaster.cpp 2008-05-06 01:28:57.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/MP3Broadcaster/MP3FileBroadcaster.cpp 2008-05-30 23:36:33.000000000 +0200 +@@ -23,6 +23,7 @@ + * + */ + ++#include + #include "MP3FileBroadcaster.h" + #include + //#include +@@ -312,7 +313,7 @@ + break; + + // next three bytes are length, so go two bytes, copy 4 and mask off one +- int fieldLen = ntohl(OS::GetUInt32FromMemory((UInt32*)(ptr+2))) & 0x00ffffff; ++ int fieldLen = bswap_32(OS::GetUInt32FromMemory((UInt32*)(ptr+2))) & 0x00ffffff; + + if (!strncmp(ptr, "TP1", 3)) // Artist + { +@@ -404,7 +405,7 @@ + if (*ptr == 0) + break; + +- int fieldLen = ntohl(OS::GetUInt32FromMemory((UInt32*)(ptr+4))); ++ int fieldLen = bswap_32(OS::GetUInt32FromMemory((UInt32*)(ptr+4))); + + // should check compression and encryption flags for these fields, but I + // wouldn't really expect them to be set for title or artist +diff -ur DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/BroadcasterSession.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/BroadcasterSession.cpp +--- DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/BroadcasterSession.cpp 2008-05-06 01:29:00.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/BroadcasterSession.cpp 2008-05-30 23:37:53.000000000 +0200 +@@ -31,6 +31,7 @@ + + */ + ++#include + #include "BroadcasterSession.h" + #include "OSMemory.h" + #include "StrPtrLen.h" +@@ -835,10 +836,10 @@ + return; + + UInt16* theSeqNumP = (UInt16*)inPacket; +- UInt16 theSeqNum = ntohs(theSeqNumP[1]); ++ UInt16 theSeqNum = bswap_16(theSeqNumP[1]); + + // UInt32* theSsrcP = (UInt32*)inPacket; +-// UInt32 theSSRC = ntohl(theSsrcP[2]); ++// UInt32 theSSRC = bswap_32(theSsrcP[2]); + + for (UInt32 x = 0; x < fSDPParser.GetNumStreams(); x++) + { +@@ -940,11 +941,11 @@ + UInt32 *theWriter = (UInt32*)theRRBuffer; + + // APP PACKET - QoS info +- *(theWriter++) = htonl(0x80CC0000); +- //*(ia++) = htonl(trk[i].TrackSSRC); +- *(theWriter++) = htonl(0); +- *(theWriter++) = htonl('ack '); +- *(theWriter++) = htonl(0); ++ *(theWriter++) = bswap_32(0x80CC0000); ++ //*(ia++) = bswap_32(trk[i].TrackSSRC); ++ *(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32('ack '); ++ *(theWriter++) = bswap_32(0); + + SInt16 theSeqNumDifference = inCurSeqNum - fStats[inTrackIndex].fHighestSeqNum; + +@@ -959,7 +960,7 @@ + + if (theSeqNumDifference > 0) + { +- *(theWriter++) = htonl(fStats[inTrackIndex].fLastAckedSeqNum + 1); ++ *(theWriter++) = bswap_32(fStats[inTrackIndex].fLastAckedSeqNum + 1); + #if BROADCAST_SESSION_DEBUG + qtss_printf("TrackID: %d Acking: %d\n", fSDPParser.GetStreamInfo(inTrackIndex)->fTrackID, fStats[inTrackIndex].fLastAckedSeqNum + 1); + #endif +@@ -997,20 +998,20 @@ + } + + // We have 1 completed mask. Add it to the packet +- *(theWriter++) = htonl(mask); ++ *(theWriter++) = bswap_32(mask); + } + fStats[inTrackIndex].fLastAckedSeqNum = inCurSeqNum; + } + else + { + // Just ack cur seq num, this is an out of order packet +- *(theWriter++) = htonl(inCurSeqNum); ++ *(theWriter++) = bswap_32(inCurSeqNum); + } + + // + // Set the packet length + UInt16* lenP = (UInt16*)theRRBuffer; +- lenP[1] = htons((theWriter - theWriterStart) - 1); //length in octets - 1 ++ lenP[1] = bswap_16((theWriter - theWriterStart) - 1); //length in octets - 1 + + // Send the packet + Assert(fStats[inTrackIndex].fDestRTCPPort != 0); +@@ -1037,11 +1038,11 @@ + UInt32 *theWriter = (UInt32*)theRRBuffer; + + // RECEIVER REPORT +- *(theWriter++) = htonl(0x81c90007); // 1 src RR packet +- //*(theWriter++) = htonl(trk[i].rcvrSSRC); +- *(theWriter++) = htonl(0); +- //*(theWriter++) = htonl(trk[i].TrackSSRC); +- *(theWriter++) = htonl(0); ++ *(theWriter++) = bswap_32(0x81c90007); // 1 src RR packet ++ //*(theWriter++) = bswap_32(trk[i].rcvrSSRC); ++ *(theWriter++) = bswap_32(0); ++ //*(theWriter++) = bswap_32(trk[i].TrackSSRC); ++ *(theWriter++) = bswap_32(0); + //if (trk[i].rtp_num_received > 0) + // t = ((float)trk[i].rtp_num_lost / (float)trk[i].rtp_num_received) * 256; + //else +@@ -1049,28 +1050,28 @@ + //temp = t; + //temp = (temp & 0xff) << 24; + //temp |= (trk[i].rtp_num_received & 0x00ffffff); +- *(theWriter++) = htonl(0); ++ *(theWriter++) = bswap_32(0); + //temp = (trk[i].seq_num_cycles & 0xffff0000) | (trk[i].last_seq_num & 0x0000ffff); + //*(ia++) = toBigEndian_ulong(temp); +- *(theWriter++) = htonl(0); ++ *(theWriter++) = bswap_32(0); + *(theWriter++) = 0; // don't do jitter yet. + *(theWriter++) = 0; // don't do last SR timestamp + *(theWriter++) = 0; // don't do delay since last SR + + // APP PACKET - QoS info +- *(theWriter++) = htonl(0x80CC000C); +- //*(ia++) = htonl(trk[i].TrackSSRC); +- *(theWriter++) = htonl(0); ++ *(theWriter++) = bswap_32(0x80CC000C); ++ //*(ia++) = bswap_32(trk[i].TrackSSRC); ++ *(theWriter++) = bswap_32(0); + // this QTSS changes after beta to 'qtss' +- *(theWriter++) = htonl('QTSS'); ++ *(theWriter++) = bswap_32('QTSS'); + //*(ia++) = toBigEndian_ulong(trk[i].rcvrSSRC); +- *(theWriter++) = htonl(0); +- *(theWriter++) = htonl(8); // eight 4-byte quants below ++ *(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32(8); // eight 4-byte quants below + #define RR 0x72720004 + #define PR 0x70720004 + #define PD 0x70640002 + #define PL 0x706C0004 +- *(theWriter++) = htonl(RR); ++ *(theWriter++) = bswap_32(RR); + //unsigned int now, secs; + //now = microseconds(); + //secs = now - trk[i].last_rtcp_packet_sent_us / USEC_PER_SEC; +@@ -1078,16 +1079,16 @@ + // temp = trk[i].bytes_received_since_last_rtcp / secs; + //else + // temp = 0; +- //*(ia++) = htonl(temp); +- *(theWriter++) = htonl(0); +- *(theWriter++) = htonl(PR); +- //*(ia++) = htonl(trk[i].rtp_num_received); +- *(theWriter++) = htonl(0); +- *(theWriter++) = htonl(PL); +- //*(ia++) = htonl(trk[i].rtp_num_lost); +- *(theWriter++) = htonl(0); +- *(theWriter++) = htonl(PD); +- *(theWriter++) = htonl(0); // should be a short, but we need to pad to a long for the entire RTCP app packet ++ //*(ia++) = bswap_32(temp); ++ *(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32(PR); ++ //*(ia++) = bswap_32(trk[i].rtp_num_received); ++ *(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32(PL); ++ //*(ia++) = bswap_32(trk[i].rtp_num_lost); ++ *(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32(PD); ++ *(theWriter++) = bswap_32(0); // should be a short, but we need to pad to a long for the entire RTCP app packet + + #if BROADCAST_SESSION_DEBUG + qtss_printf("Sending receiver reports.\n"); +diff -ur DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/PlaylistBroadcaster.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/PlaylistBroadcaster.cpp +--- DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/PlaylistBroadcaster.cpp 2008-05-06 01:29:00.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/PlaylistBroadcaster.cpp 2008-05-30 23:38:11.000000000 +0200 +@@ -45,6 +45,7 @@ + + + ++#include + #include + #include + #include "SafeStdLib.h" +@@ -419,7 +420,7 @@ + + // if the address is a multicast address then we can't announce the broadcast. + +- if(SocketUtils::IsMulticastIPAddr(ntohl(inet_addr(broadcastParms->mDestAddress)))) { ++ if(SocketUtils::IsMulticastIPAddr(bswap_32(inet_addr(broadcastParms->mDestAddress)))) { + sAnnounceBroadcast = false; + return true; + } +@@ -2082,7 +2083,7 @@ + + struct sigaction act; + +-#if defined(sun) || defined(i386) || defined(__MacOSX__) || defined(__powerpc__) || defined (__sgi_cc__) || defined(__osf__) || defined(__hpux__) ++#if defined(sun) || defined(i386) || defined(__MacOSX__) || defined(__powerpc__) || defined (__sgi_cc__) || defined(__osf__) || defined(__hpux__) || defined(__linux__) + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = (void(*)(int))&SignalEventHandler; +diff -ur DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/playlist_elements.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/playlist_elements.cpp +--- DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/playlist_elements.cpp 2008-05-06 01:29:00.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/playlist_elements.cpp 2008-05-30 23:38:32.000000000 +0200 +@@ -23,6 +23,7 @@ + * + */ + ++#include + #include "playlist_elements.h" + #include "playlist_utils.h" + #include "OS.h" +@@ -100,7 +101,7 @@ + fData.fSavedSoundDescSize = descSize; + fData.fSavedDataRefIndex ++ ; // it is different than saved so change the index + } +- packetSDPtr->dataRefIndex = htons(fData.fSavedDataRefIndex); ++ packetSDPtr->dataRefIndex = bswap_16(fData.fSavedDataRefIndex); + + } while (false); + } +@@ -168,10 +169,10 @@ + + //write the SR & SDES headers + UInt32* theSRWriter = (UInt32*)&fData.fSenderReportBuffer; +- *theSRWriter = htonl(0x80c80006); ++ *theSRWriter = bswap_32(0x80c80006); + theSRWriter += 7; + //SDES length is the length of the CName, plus 2 32bit words +- *theSRWriter = htonl(0x81ca0000 + (cNameLen >> 2) + 1); ++ *theSRWriter = bswap_32(0x81ca0000 + (cNameLen >> 2) + 1); + ::memcpy(&fData.fSenderReportBuffer[kSenderReportSizeInBytes], theTempCName, cNameLen); + fData.fSenderReportSize = kSenderReportSizeInBytes + cNameLen; + } +@@ -345,7 +346,7 @@ + UInt32* theReport = (UInt32*) fData.fSenderReportBuffer; + + theReport++; +- *theReport = htonl(fData.fSsrc); ++ *theReport = bswap_32(fData.fSsrc); + + theReport++; + SInt64* theNTPTimestampP = (SInt64*)theReport; +@@ -353,7 +354,7 @@ + PlayListUtils::TimeMilli_To_Fixed64Secs(theTime - fData.fStreamStartTime)); + + theReport += 2; +- *theReport = htonl(fData.fTimeStamp); ++ *theReport = bswap_32(fData.fTimeStamp); + + Float64 curTimeInScale = (Float64) (SInt64) PlayListUtils::Milliseconds() / (Float64) PlayListUtils::eMilli; // convert to float seconds + curTimeInScale = curTimeInScale * (Float64) fData.fMovieMediaTypePtr->fTimeScale; // curTime in media time scale +@@ -361,18 +362,18 @@ + curTimeInScale = (UInt32) ( (UInt64) curTimeInScale & (UInt64) 0xFFFFFFFF ); + + //qtss_printf("MediaStream::UpdateSenderReport RTCP timestamp = %"_U32BITARG_"\n",(UInt32) curTimeInScale); +- *theReport = htonl((UInt32) curTimeInScale); ++ *theReport = bswap_32((UInt32) curTimeInScale); + + theReport++; + fData.fPacketCount = (UInt32) fData.fPacketsSent; +- *theReport = htonl(fData.fPacketCount); ++ *theReport = bswap_32(fData.fPacketCount); + + theReport++; + fData.fByteCount = (UInt32) fData.fBytesSent; +- *theReport = htonl(fData.fByteCount); ++ *theReport = bswap_32(fData.fByteCount); + + theReport += 2; +- *theReport = htonl(fData.fSsrc); ++ *theReport = bswap_32(fData.fSsrc); + + LogStr("Sender Report\n"); + LogUInt("NTP ",(UInt32) ((*theNTPTimestampP) >> 32)," "); +@@ -463,23 +464,23 @@ + { + ::memset(&fLocalAddrRTp, 0, sizeof(fLocalAddrRTp)); + fLocalAddrRTp.sin_family = PF_INET; +- fLocalAddrRTp.sin_port = htons(0); +- fLocalAddrRTp.sin_addr.s_addr = htonl(addr); ++ fLocalAddrRTp.sin_port = bswap_16(0); ++ fLocalAddrRTp.sin_addr.s_addr = bswap_32(addr); + + ::memset(&fLocalAddrRTCp, 0, sizeof(fLocalAddrRTCp)); + fLocalAddrRTCp.sin_family = PF_INET; +- fLocalAddrRTCp.sin_port = htons(0); +- fLocalAddrRTCp.sin_addr.s_addr = htonl(addr); ++ fLocalAddrRTCp.sin_port = bswap_16(0); ++ fLocalAddrRTCp.sin_addr.s_addr = bswap_32(addr); + + ::memset(&fDestAddrRTp, 0, sizeof(fDestAddrRTp)); + fDestAddrRTp.sin_family = PF_INET; +- fDestAddrRTp.sin_port = htons(0); +- fDestAddrRTp.sin_addr.s_addr = htonl(addr); ++ fDestAddrRTp.sin_port = bswap_16(0); ++ fDestAddrRTp.sin_addr.s_addr = bswap_32(addr); + + ::memset(&fDestAddrRTCp, 0, sizeof(fDestAddrRTCp)); + fDestAddrRTCp.sin_family = PF_INET; +- fDestAddrRTCp.sin_port = htons(0); +- fDestAddrRTCp.sin_addr.s_addr = htonl(addr); ++ fDestAddrRTCp.sin_port = bswap_16(0); ++ fDestAddrRTCp.sin_addr.s_addr = bswap_32(addr); + } + + SInt16 UDPSocketPair::Bind(UInt32 addr) +@@ -502,8 +503,8 @@ + PortRTCp = count; + Assert( (PortRTCp & 1) == 1);// must be odd and one more than rtp port + +- fLocalAddrRTp.sin_port = htons( (UInt16) PortRTp); +- fLocalAddrRTCp.sin_port = htons( (UInt16) PortRTCp); ++ fLocalAddrRTp.sin_port = bswap_16( (UInt16) PortRTp); ++ fLocalAddrRTCp.sin_port = bswap_16( (UInt16) PortRTCp); + + //qtss_printf("Attempting to bind to rtp port %d \n",PortRTp); + +@@ -546,7 +547,7 @@ + if (destAddrPtr == NULL) break; + if (socket == kInvalidSocket) break; + +- //qtss_printf("Sending data to %d. Addr = %d inLength = %d\n", ntohs(theAddr->sin_port), ntohl(theAddr->sin_addr.s_addr), inLength); ++ //qtss_printf("Sending data to %d. Addr = %d inLength = %d\n", bswap_16(theAddr->sin_port), bswap_32(theAddr->sin_addr.s_addr), inLength); + ::sendto(socket, inBuffer, inLength, 0, destAddrPtr, sizeof(sockaddr)); + + result = 0; +@@ -585,14 +586,14 @@ + { UInt32 netAddress = inet_addr(destAddress); + + fDestAddrRTp = fLocalAddrRTp; +- fDestAddrRTp.sin_port = htons(destPortRTp); ++ fDestAddrRTp.sin_port = bswap_16(destPortRTp); + fDestAddrRTp.sin_addr.s_addr = netAddress; + + fDestAddrRTCp = fLocalAddrRTCp; +- fDestAddrRTCp.sin_port = htons(destPortRTCp); ++ fDestAddrRTCp.sin_port = bswap_16(destPortRTCp); + fDestAddrRTCp.sin_addr.s_addr = netAddress; + +- fIsMultiCast = SocketUtils::IsMulticastIPAddr(ntohl(netAddress)); ++ fIsMultiCast = SocketUtils::IsMulticastIPAddr(bswap_32(netAddress)); + + result = 0; + } +@@ -619,8 +620,8 @@ + UInt32 localAddr = fLocalAddrRTp.sin_addr.s_addr; // Already in network byte order + + #if __solaris__ +- if( localAddr == htonl(INADDR_ANY) ) +- localAddr = htonl(SocketUtils::GetIPAddr(0)); ++ if( localAddr == bswap_32(INADDR_ANY) ) ++ localAddr = bswap_32(SocketUtils::GetIPAddr(0)); + #endif + + struct ip_mreq theMulti; +@@ -656,8 +657,8 @@ + UInt32 localAddr = fLocalAddrRTp.sin_addr.s_addr; // Already in network byte order + + #if __solaris__ +- if( localAddr == htonl(INADDR_ANY) ) +- localAddr = htonl(SocketUtils::GetIPAddr(0)); ++ if( localAddr == bswap_32(INADDR_ANY) ) ++ localAddr = bswap_32(SocketUtils::GetIPAddr(0)); + #endif + + struct ip_mreq theMulti; +@@ -771,7 +772,7 @@ + { + char *offsetPtr = fThePacket + kRTpHeaderSize + sizeof(SoundHeader); + *soundDescriptionPtr = (SoundDescription *) offsetPtr; +- SInt32 descSize = ntohl( (**soundDescriptionPtr).descSize); ++ SInt32 descSize = bswap_32( (**soundDescriptionPtr).descSize); + fSoundDescriptionLen = descSize; + result = 0; + } +@@ -828,9 +829,9 @@ + if (fThePacket && timeStampPtr && sequencePtr && SSRCPtr && payloadTypeAndMarkPtr) + { + *payloadTypeAndMarkPtr = header8Ptr[cPayloadType]; +- *sequencePtr = ntohs(header16Ptr[cSequenceNumber]); +- *timeStampPtr = ntohl(header32Ptr[cTimeStamp]); +- *SSRCPtr = ntohl(header32Ptr[cSSRC]); ++ *sequencePtr = bswap_16(header16Ptr[cSequenceNumber]); ++ *timeStampPtr = bswap_32(header32Ptr[cTimeStamp]); ++ *SSRCPtr = bswap_32(header32Ptr[cSSRC]); + result = 0; + } + +@@ -859,9 +860,9 @@ + LogUInt("ssrc = ", SSRC, "\n"); + + header8Ptr[cPayloadType] = payloadTypeAndMark; +- header16Ptr[cSequenceNumber] = htons(sequence); +- header32Ptr[cTimeStamp] = htonl(timeStamp); +- header32Ptr[cSSRC] = htonl(SSRC); ++ header16Ptr[cSequenceNumber] = bswap_16(sequence); ++ header32Ptr[cTimeStamp] = bswap_32(timeStamp); ++ header32Ptr[cSSRC] = bswap_32(SSRC); + result = 0; + + LogBuffer(); +diff -ur DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/playlist_SDPGen.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/playlist_SDPGen.cpp +--- DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/playlist_SDPGen.cpp 2008-05-06 01:29:00.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/playlist_SDPGen.cpp 2008-05-30 23:38:54.000000000 +0200 +@@ -22,6 +22,7 @@ + * @APPLE_LICENSE_HEADER_END@ + * + */ ++#include + #include "playlist_utils.h" + #include "playlist_SDPGen.h" + #include "playlist_broadcaster.h" +@@ -162,7 +163,7 @@ + // c=IN IP4 (destinatin ip address) + { + char sdpLine[255]; +- if (SocketUtils::IsMulticastIPAddr(ntohl(inet_addr(ipAddress)))) ++ if (SocketUtils::IsMulticastIPAddr(bswap_32(inet_addr(ipAddress)))) + qtss_sprintf(sdpLine, "c=IN IP4 %s/%s\r\n", ipAddress,ttl); + else + qtss_sprintf(sdpLine, "c=IN IP4 %s\r\n", ipAddress); +diff -ur DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/PLBroadcastDef.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/PLBroadcastDef.cpp +--- DarwinStreamingSrvr6.0.3-Source/PlaylistBroadcaster.tproj/PLBroadcastDef.cpp 2008-05-06 01:29:00.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/PlaylistBroadcaster.tproj/PLBroadcastDef.cpp 2008-05-30 23:39:09.000000000 +0200 +@@ -28,6 +28,7 @@ + 8.2.99 - rt updated ShowSettings() to display user names for fields instead of C++ member names. + */ + ++#include + #include "PLBroadcastDef.h" + #include "MyAssert.h" + #include "SocketUtils.h" +@@ -473,7 +474,7 @@ + struct hostent* theHostent = ::gethostbyname(mDestAddress); + if (theHostent != NULL) + { +- inAddr = ntohl(*(UInt32*)(theHostent->h_addr_list[0])); ++ inAddr = bswap_32(*(UInt32*)(theHostent->h_addr_list[0])); + + struct in_addr inAddrStruct; + char buffer[50]; +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom.cpp 2008-05-30 23:39:44.000000000 +0200 +@@ -30,6 +30,7 @@ + // ------------------------------------- + // Includes + // ++#include + #include + #include + #include "SafeStdLib.h" +@@ -126,7 +127,7 @@ + if( !ReadBytes(Offset, (char *)&tempDatum, 2) ) + return false; + +- *Datum = ntohs(tempDatum); ++ *Datum = bswap_16(tempDatum); + return true; + } + +@@ -141,7 +142,7 @@ + if( !ReadBytes(Offset, (char *)&tempDatum, 4) ) + return false; + +- *Datum = ntohl(tempDatum); ++ *Datum = bswap_32(tempDatum); + return true; + } + +@@ -156,7 +157,7 @@ + if( !ReadBytes(Offset, (char *)&tempDatum, 4) ) + return false; + +- tempDatum = ntohl(tempDatum); ++ tempDatum = bswap_32(tempDatum); + *Datum = (UInt64) tempDatum; + return true; + } +@@ -171,7 +172,7 @@ + if( !ReadBytes(Offset, (char *)&tempDatum, 4) ) + return false; + +- tempDatum = ntohl(tempDatum); ++ tempDatum = bswap_32(tempDatum); + *Datum = (SInt64) (SInt32) tempDatum; + return true; + } +@@ -233,7 +234,7 @@ + if( !ReadSubAtomBytes(AtomPath, (char *)&tempDatum, 2) ) + return false; + +- *Datum = ntohs(tempDatum); ++ *Datum = bswap_16(tempDatum); + return true; + } + +@@ -248,7 +249,7 @@ + if( !ReadSubAtomBytes(AtomPath, (char *)&tempDatum, 4) ) + return false; + +- *Datum = ntohl(tempDatum); ++ *Datum = bswap_32(tempDatum); + return true; + } + +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_dref.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_dref.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_dref.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_dref.cpp 2008-05-30 23:39:52.000000000 +0200 +@@ -31,6 +31,7 @@ + // ------------------------------------- + // Includes + // ++#include + #include + #include + #include "SafeStdLib.h" +@@ -345,23 +346,23 @@ + for( int loopCount = kMaxMark - 1; loopCount >= 0; loopCount--) { + // + // Break out of the loop if this is a match/the end of the alias. +- if( ((short)ntohs(AliasVarInfo->what) == kAbsPath) || ((short)ntohs(AliasVarInfo->what) == kEndMark) ) ++ if( ((short)bswap_16(AliasVarInfo->what) == kAbsPath) || ((short)bswap_16(AliasVarInfo->what) == kEndMark) ) + break; + + // + // Otherwise we need to move to the next data unit. +- AliasVarInfo = (varInfo *)((char *)AliasVarInfo + ((ntohs(AliasVarInfo->len) + 1) & ~1) + 4 /* header size */); ++ AliasVarInfo = (varInfo *)((char *)AliasVarInfo + ((bswap_16(AliasVarInfo->len) + 1) & ~1) + 4 /* header size */); + } + + + // + // Now that we have the path, we need to strip off the absolute portions + // of it so that we can get at it from our current (relative) root. +- AliasVarInfo->data[ntohs(AliasVarInfo->len)] = '\0'; ++ AliasVarInfo->data[bswap_16(AliasVarInfo->len)] = '\0'; + + pathStart = path = AliasVarInfo->data; +- path += ntohs(AliasVarInfo->len); +- int i = ntohs(Alias->nlvlTo); ++ path += bswap_16(AliasVarInfo->len); ++ int i = bswap_16(Alias->nlvlTo); + pathLength = -1; + while( i && (path > pathStart) ) { + if( *path-- == ':' ) +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stco.h DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stco.h +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stco.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stco.h 2008-05-30 23:40:44.000000000 +0200 +@@ -33,6 +33,7 @@ + // + // Includes + #ifndef __Win32__ ++#include + #include + #endif + #include "QTFile.h" +@@ -63,7 +64,7 @@ + if (Offset && ChunkNumber && (ChunkNumber<=fNumEntries)) + { + if (4 == fOffSetSize) +- *Offset = (UInt64) ntohl( ( (UInt32 *) fTable)[ChunkNumber-1]); ++ *Offset = (UInt64) bswap_32( ( (UInt32 *) fTable)[ChunkNumber-1]); + else + *Offset = (UInt64) QTAtom::NTOH64( ( (UInt64 *) fTable)[ChunkNumber-1]); + +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stsc.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stsc.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stsc.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stsc.cpp 2008-05-30 23:40:51.000000000 +0200 +@@ -30,6 +30,7 @@ + // ------------------------------------- + // Includes + // ++#include + #include + #include + #include "SafeStdLib.h" +@@ -255,7 +256,7 @@ + if (fNumEntries == 1) + { + memcpy(&samplesPerChunk, fSampleToChunkTable + (STCB->fCurEntry_GetChunkFirstLastSample * 12) + 4, 4); +- samplesPerChunk = ntohl(samplesPerChunk); ++ samplesPerChunk = bswap_32(samplesPerChunk); + + prevSamplesPerChunk = ((chunkNumber -1 ) * samplesPerChunk); + totalSamples = chunkNumber * samplesPerChunk; +@@ -268,9 +269,9 @@ + prevFirstChunk = thisFirstChunk; + + memcpy(&thisFirstChunk, fSampleToChunkTable + (STCB->fCurEntry_GetChunkFirstLastSample * 12) + 0, 4); +- thisFirstChunk = ntohl(thisFirstChunk); ++ thisFirstChunk = bswap_32(thisFirstChunk); + memcpy(&samplesPerChunk, fSampleToChunkTable + (STCB->fCurEntry_GetChunkFirstLastSample * 12) + 4, 4); +- samplesPerChunk = ntohl(samplesPerChunk); ++ samplesPerChunk = bswap_32(samplesPerChunk); + + if (prevSamplesPerChunk == 0) + prevSamplesPerChunk = samplesPerChunk; +@@ -347,11 +348,11 @@ + prevFirstChunk = thisFirstChunk; + + memcpy(&thisFirstChunk, fSampleToChunkTable + (STCB->fCurEntry * 12) + 0, 4); +- thisFirstChunk = ntohl(thisFirstChunk); ++ thisFirstChunk = bswap_32(thisFirstChunk); + memcpy(&samplesPerChunk, fSampleToChunkTable + (STCB->fCurEntry * 12) + 4, 4); +- samplesPerChunk = ntohl(samplesPerChunk); ++ samplesPerChunk = bswap_32(samplesPerChunk); + memcpy(&sampleDescription, fSampleToChunkTable + (STCB->fCurEntry * 12) + 8, 4); +- sampleDescription = ntohl(sampleDescription); ++ sampleDescription = bswap_32(sampleDescription); + + thisChunk = thisFirstChunk; + numChunks = thisFirstChunk - prevFirstChunk; +@@ -488,11 +489,11 @@ + // + // Copy this entry's fields. + memcpy(&FirstChunk, fSampleToChunkTable + (STCB->fCurEntry_SampleToChunkInfo * 12) + 0, 4); +- FirstChunk = ntohl(FirstChunk); ++ FirstChunk = bswap_32(FirstChunk); + memcpy(&SamplesPerChunk, fSampleToChunkTable + (STCB->fCurEntry_SampleToChunkInfo * 12) + 4, 4); +- SamplesPerChunk = ntohl(SamplesPerChunk); ++ SamplesPerChunk = bswap_32(SamplesPerChunk); + memcpy(&SampleDescription, fSampleToChunkTable + (STCB->fCurEntry_SampleToChunkInfo * 12) + 8, 4); +- SampleDescription = ntohl(SampleDescription); ++ SampleDescription = bswap_32(SampleDescription); + + // + // Check to see if the sample was actually in the last chunk and +@@ -605,11 +606,11 @@ + // + // Copy this entry's fields. + memcpy(&FirstChunk, fSampleToChunkTable + (CurEntry * 12) + 0, 4); +- FirstChunk = ntohl(FirstChunk); ++ FirstChunk = bswap_32(FirstChunk); + memcpy(&SamplesPerChunk, fSampleToChunkTable + (CurEntry * 12) + 4, 4); +- SamplesPerChunk = ntohl(SamplesPerChunk); ++ SamplesPerChunk = bswap_32(SamplesPerChunk); + memcpy(&SampleDescription, fSampleToChunkTable + (CurEntry * 12) + 8, 4); +- SampleDescription = ntohl(SampleDescription); ++ SampleDescription = bswap_32(SampleDescription); + + // + // Print out a listing. +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stsd.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stsd.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stsd.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stsd.cpp 2008-05-30 23:41:13.000000000 +0200 +@@ -31,6 +31,7 @@ + // ------------------------------------- + // Includes + // ++#include + #include + #include + #include "SafeStdLib.h" +@@ -141,7 +142,7 @@ + // + // Skip over this mini-atom. + memcpy(&tempInt32, pSampleDescriptionTable, 4); +- pSampleDescriptionTable += ntohl(tempInt32); ++ pSampleDescriptionTable += bswap_32(tempInt32); + if (pSampleDescriptionTable > maxSampleDescriptionPtr) + { return false; + } +@@ -171,7 +172,7 @@ + // + // Get this entry's data format. + memcpy(&tempInt32, fTable[CurDesc] + stsdDescPos_DataFormat, 4); +- tempInt32 = ntohl(tempInt32); ++ tempInt32 = bswap_32(tempInt32); + + // + // Skip this entry if it does not match. +@@ -183,7 +184,7 @@ + *Buffer = fTable[CurDesc]; + + memcpy(&tempInt32, fTable[CurDesc] + stsdDescPos_Size, 4); +- *Length = ntohl(tempInt32); ++ *Length = bswap_32(tempInt32); + + return true; + } +@@ -207,7 +208,7 @@ + // + // Find and return the given sample's data reference index. + memcpy(&tempInt16, fTable[SampleDescriptionID - 1] + stsdDescPos_Index, 2); +- return ntohs(tempInt16); ++ return bswap_16(tempInt16); + } + + +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stss.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stss.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stss.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stss.cpp 2008-05-30 23:41:18.000000000 +0200 +@@ -31,6 +31,7 @@ + // ------------------------------------- + // Includes + // ++#include + #include + #include + #include "SafeStdLib.h" +@@ -148,7 +149,7 @@ + + for ( sampleIndex = 0; sampleIndex < fNumEntries; sampleIndex++ ) + { +- fTable[sampleIndex] = ntohl( fTable[sampleIndex] ); ++ fTable[sampleIndex] = bswap_32( fTable[sampleIndex] ); + + } + +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stsz.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stsz.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stsz.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stsz.cpp 2008-05-30 23:41:26.000000000 +0200 +@@ -31,6 +31,7 @@ + // ------------------------------------- + // Includes + // ++#include + #include + #include + #include "SafeStdLib.h" +@@ -164,7 +165,7 @@ + { *sizePtr = 0; + + for (UInt32 sampleNumber = firstSampleNumber; sampleNumber <= lastSampleNumber; sampleNumber++ ) +- *sizePtr += ntohl(fTable[sampleNumber-1]); ++ *sizePtr += bswap_32(fTable[sampleNumber-1]); + + } + result = true; +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stsz.h DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stsz.h +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stsz.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stsz.h 2008-05-30 23:43:15.000000000 +0200 +@@ -33,6 +33,7 @@ + + // + // Includes ++#include + #include "QTFile.h" + #include "QTAtom.h" + +@@ -62,7 +63,7 @@ + return true; \ + } else if(SampleNumber && (SampleNumber<=fNumEntries)) { \ + if( Size != NULL ) \ +- *Size = ntohl(fTable[SampleNumber-1]); \ ++ *Size = bswap_32(fTable[SampleNumber-1]); \ + return true; \ + } else \ + return false; \ +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stts.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stts.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_stts.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_stts.cpp 2008-05-30 23:41:31.000000000 +0200 +@@ -31,6 +31,7 @@ + // ------------------------------------- + // Includes + // ++#include + #include + #include + #include "SafeStdLib.h" +@@ -195,9 +196,9 @@ + // + // Copy this sample count and duration. + memcpy(&SampleCount, fTimeToSampleTable + (STCB->fMTtSN_CurEntry * 8), 4); +- SampleCount = ntohl(SampleCount); ++ SampleCount = bswap_32(SampleCount); + memcpy(&SampleDuration, fTimeToSampleTable + (STCB->fMTtSN_CurEntry * 8) + 4, 4); +- SampleDuration = ntohl(SampleDuration); ++ SampleDuration = bswap_32(SampleDuration); + + // + // Can we skip over this entry? +@@ -255,9 +256,9 @@ + // + // Copy this sample count and duration. + memcpy(&SampleCount, fTimeToSampleTable + (STCB->fSNtMT_CurEntry * 8), 4); +- SampleCount = ntohl(SampleCount); ++ SampleCount = bswap_32(SampleCount); + memcpy(&SampleDuration, fTimeToSampleTable + (STCB->fSNtMT_CurEntry * 8) + 4, 4); +- SampleDuration = ntohl(SampleDuration); ++ SampleDuration = bswap_32(SampleDuration); + + // + // Can we skip over this entry? +@@ -312,9 +313,9 @@ + // + // Copy this sample count and duration. + memcpy(&SampleCount, fTimeToSampleTable + (CurEntry * 8), 4); +- SampleCount = ntohl(SampleCount); ++ SampleCount = bswap_32(SampleCount); + memcpy(&SampleDuration, fTimeToSampleTable + (CurEntry* 8) + 4, 4); +- SampleDuration = ntohl(SampleDuration); ++ SampleDuration = bswap_32(SampleDuration); + + // Print out a listing. + qtss_printf(" %10"_U32BITARG_" : %10"_U32BITARG_" %10"_U32BITARG_"\n", CurEntry, SampleCount, SampleDuration); +@@ -454,9 +455,9 @@ + // + // Copy this sample count and duration. + memcpy(&SampleCount, fTimeToSampleTable + (STCB->fMTtSN_CurEntry * 8), 4); +- SampleCount = ntohl(SampleCount); ++ SampleCount = bswap_32(SampleCount); + memcpy(&SampleDuration, fTimeToSampleTable + (STCB->fMTtSN_CurEntry * 8) + 4, 4); +- SampleDuration = ntohl(SampleDuration); ++ SampleDuration = bswap_32(SampleDuration); + + // + // Can we skip over this entry? +@@ -514,9 +515,9 @@ + // + // Copy this sample count and duration. + memcpy(&SampleCount, fTimeToSampleTable + (STCB->fSNtMT_CurEntry * 8), 4); +- SampleCount = ntohl(SampleCount); ++ SampleCount = bswap_32(SampleCount); + memcpy(&SampleOffset, fTimeToSampleTable + (STCB->fSNtMT_CurEntry * 8) + 4, 4); +- SampleOffset = ntohl(SampleOffset); ++ SampleOffset = bswap_32(SampleOffset); + + // + // Can we skip over this entry? +@@ -571,9 +572,9 @@ + // + // Copy this sample count and duration. + memcpy(&SampleCount, fTimeToSampleTable + (CurEntry * 8), 4); +- SampleCount = ntohl(SampleCount); ++ SampleCount = bswap_32(SampleCount); + memcpy(&SampleOffset, fTimeToSampleTable + (CurEntry* 8) + 4, 4); +- SampleOffset = ntohl(SampleOffset); ++ SampleOffset = bswap_32(SampleOffset); + + // Print out a listing. + qtss_printf(" %10"_U32BITARG_" : %10"_U32BITARG_" %10"_U32BITARG_"\n", CurEntry, SampleCount, SampleOffset); +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_tref.h DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_tref.h +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTAtom_tref.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTAtom_tref.h 2008-05-30 23:43:53.000000000 +0200 +@@ -33,6 +33,7 @@ + // + // Includes + #ifndef __Win32__ ++#include + #include + #endif + +@@ -62,7 +63,7 @@ + inline Bool16 TrackReferenceToTrackID(UInt32 TrackReference, UInt32 * TrackID = NULL) \ + { if(TrackReference < fNumEntries) { \ + if( TrackID != NULL ) \ +- *TrackID = ntohl(fTable[TrackReference]); \ ++ *TrackID = bswap_32(fTable[TrackReference]); \ + return true; \ + } else \ + return false; \ +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTFile.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTFile.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTFile.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTFile.cpp 2008-05-30 23:44:05.000000000 +0200 +@@ -32,6 +32,7 @@ + // Includes + // + ++#include + #include + + #include +@@ -656,7 +657,7 @@ + // + // Swap the AtomLength for little-endian machines. + CurPos += 4; +- atomLength = ntohl(atomLength); ++ atomLength = bswap_32(atomLength); + BigAtomLength = (UInt64) atomLength; + hasBigAtom = false; + +@@ -691,12 +692,12 @@ + if( !Read(CurPos, (char *)&atomLength, 4) ) + return false; + CurPos += 4; +- BigAtomLength = (UInt64) ntohl(atomLength); ++ BigAtomLength = (UInt64) bswap_32(atomLength); + + if( !Read(CurPos, (char *)&AtomType, 4) ) + return false; + CurPos += 4; +- AtomType = ntohl(AtomType); ++ AtomType = bswap_32(AtomType); + + // + // Skip over the rest of the fields. +@@ -716,7 +717,7 @@ + + CurPos += 4; + CurAtomHeaderSize = 4 + 4; // AtomLength + AtomType +- AtomType = ntohl(AtomType); ++ AtomType = bswap_32(AtomType); + + if ( atomLength == 1 ) //large size atom + { +@@ -799,7 +800,7 @@ + NewTOCEntry->TOCID = fNextTOCID++; + + NewTOCEntry->AtomType = AtomType; +- NewTOCEntry->beAtomType = htonl(AtomType); ++ NewTOCEntry->beAtomType = bswap_32(AtomType); + + NewTOCEntry->AtomDataPos = CurPos; + NewTOCEntry->AtomDataLength = BigAtomLength - CurAtomHeaderSize; +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTHintTrack.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTHintTrack.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTHintTrack.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTHintTrack.cpp 2008-05-30 23:44:14.000000000 +0200 +@@ -47,6 +47,7 @@ + // ------------------------------------- + // Includes + // ++#include + #include + #include + #include "SafeStdLib.h" +@@ -236,7 +237,7 @@ + return errInvalidQuickTimeFile; + + ::memcpy(&fMaxPacketSize, sampleDescription + 20, 4); +- fMaxPacketSize = ntohl(fMaxPacketSize); ++ fMaxPacketSize = bswap_32(fMaxPacketSize); + + for( pSampleDescription = (sampleDescription + 24); + pSampleDescription < (sampleDescription + sampleDescriptionLength); +@@ -248,27 +249,27 @@ + // + // Get the entry length and data type of this entry. + ::memcpy( &entryLength, pSampleDescription + 0, 4); +- entryLength = ntohl(entryLength); ++ entryLength = bswap_32(entryLength); + + ::memcpy( &dataType, pSampleDescription + 4, 4); +- dataType = ntohl(dataType); ++ dataType = bswap_32(dataType); + + // + // Process this data type. + switch( dataType ) { + case FOUR_CHARS_TO_INT('t', 'i', 'm', 's'): // tims RTP timescale + ::memcpy(&fRTPTimescale, pSampleDescription + 8, 4); +- fRTPTimescale = ntohl(fRTPTimescale); ++ fRTPTimescale = bswap_32(fRTPTimescale); + break; + + case FOUR_CHARS_TO_INT('t', 's', 'r', 'o'): // tsro Timestamp random offset + ::memcpy(&fTimestampRandomOffset, pSampleDescription + 8, 4); +- fTimestampRandomOffset = ntohl(fTimestampRandomOffset); ++ fTimestampRandomOffset = bswap_32(fTimestampRandomOffset); + break; + + case FOUR_CHARS_TO_INT('s', 'n', 'r', 'o'): // snro Sequence number random offset + ::memcpy(&fSequenceNumberRandomOffset, pSampleDescription + 8, 2); +- fSequenceNumberRandomOffset = ntohs(fSequenceNumberRandomOffset); ++ fSequenceNumberRandomOffset = bswap_16(fSequenceNumberRandomOffset); + break; + } + +@@ -431,17 +432,17 @@ + // need to acquire the header info on every pass + + MOVE_WORD( hdrData.hintFlags, samplePacketPtr + 8); +- hdrData.hintFlags = ntohs( hdrData.hintFlags ); ++ hdrData.hintFlags = bswap_16( hdrData.hintFlags ); + + MOVE_WORD( hdrData.dataEntryCount, samplePacketPtr + 10); +- hdrData.dataEntryCount = ntohs(hdrData.dataEntryCount); ++ hdrData.dataEntryCount = bswap_16(hdrData.dataEntryCount); + + hdrData.tlvTimestampOffset = 0; + + Bool16 tlvOK = false; // reset tlvSize to 0 if the size value or the tlv flag is invalid + if( hdrData.hintFlags & 0x4 ) do // Extra Information TLV is present + { +- hdrData.tlvSize = ntohl( *(UInt32*) (samplePacketPtr + 12) ); ++ hdrData.tlvSize = bswap_32( *(UInt32*) (samplePacketPtr + 12) ); + char* tlvParser = samplePacketPtr + 16; // start of tlv data + char* tlvEnd = tlvParser + hdrData.tlvSize;// 1 past the end of tlv data + +@@ -459,9 +460,9 @@ + // if there is a TLV, parse out the 1 field we currently know about, the 'rtpo' field + while (tlvParser + 12 < tlvEnd) // test for the minimum tlv size (size+type+smallest data size) + { +- UInt32 fieldSize = ntohl( *(UInt32*) tlvParser ); +- UInt32 theType = ntohl( *(UInt32*) (tlvParser + 4) ); +- UInt32 theData = ntohl( *(UInt32*) (tlvParser + 8) ); //data can't be smaller 4 and we only know about rtpo data ++ UInt32 fieldSize = bswap_32( *(UInt32*) tlvParser ); ++ UInt32 theType = bswap_32( *(UInt32*) (tlvParser + 4) ); ++ UInt32 theData = bswap_32( *(UInt32*) (tlvParser + 8) ); //data can't be smaller 4 and we only know about rtpo data + + if (theType == FOUR_CHARS_TO_INT( 'r', 't', 'p', 'o' )) //'rtpo' + { +@@ -479,11 +480,11 @@ + } + + MOVE_LONG_WORD( hdrData.relativePacketTransmissionTime, samplePacketPtr ); +- hdrData.relativePacketTransmissionTime = ntohl(hdrData.relativePacketTransmissionTime); ++ hdrData.relativePacketTransmissionTime = bswap_32(hdrData.relativePacketTransmissionTime); + + MOVE_WORD( hdrData.rtpHeaderBits, samplePacketPtr + 4); + MOVE_WORD( hdrData.rtpSequenceNumber, samplePacketPtr + 6); +- hdrData.rtpSequenceNumber = ntohs(hdrData.rtpSequenceNumber); ++ hdrData.rtpSequenceNumber = bswap_16(hdrData.rtpSequenceNumber); + + } + +@@ -671,7 +672,7 @@ + MOVE_WORD( entryCount, buf ); + //::memcpy(&entryCount, buf, 2); + +- *numPackets = ntohs(entryCount); ++ *numPackets = bswap_16(entryCount); + + return errNoError; + } +@@ -729,21 +730,21 @@ + trackRefIndex = (SInt8)*(pBuf + 1); + + MOVE_WORD( readLength, pBuf + 2); +- cacheHintSampleLen = hintMaxRead = readLength = ntohs(readLength); ++ cacheHintSampleLen = hintMaxRead = readLength = bswap_16(readLength); + + MOVE_LONG_WORD( mediaSampleNumber, pBuf + 4); +- mediaSampleNumber = ntohl(mediaSampleNumber); ++ mediaSampleNumber = bswap_32(mediaSampleNumber); + + MOVE_LONG_WORD( readOffset, pBuf + 8); +- readOffset = ntohl(readOffset); ++ readOffset = bswap_32(readOffset); + + MOVE_WORD( bytesPerCompressionBlock, pBuf + 12); +- bytesPerCompressionBlock = ntohs(bytesPerCompressionBlock); ++ bytesPerCompressionBlock = bswap_16(bytesPerCompressionBlock); + if( bytesPerCompressionBlock == 0 ) + bytesPerCompressionBlock = 1; + + MOVE_WORD( samplesPerCompressionBlock, pBuf + 14); +- samplesPerCompressionBlock = ntohs(samplesPerCompressionBlock); ++ samplesPerCompressionBlock = bswap_16(samplesPerCompressionBlock); + if( samplesPerCompressionBlock == 0 ) + samplesPerCompressionBlock = 1; + +@@ -1192,7 +1193,7 @@ + return errInvalidQuickTimeFile; + + MOVE_WORD( entryCount, (char *)buf + 0); +- entryCount = ntohs(entryCount); ++ entryCount = bswap_16(entryCount); + if( (packetNumber-1) > entryCount ) + return errInvalidQuickTimeFile; + +@@ -1257,24 +1258,24 @@ + + // + // Add in the RTP header. +- tempInt16 = hdrData.rtpHeaderBits | ntohs(0x8000) /* v2 RTP header */; ++ tempInt16 = hdrData.rtpHeaderBits | bswap_16(0x8000) /* v2 RTP header */; + COPY_WORD(pPacketOutBuf, &tempInt16); + + //TEMP_PRINT_ONE( "QTHintTrack::GetPacket rtpHeaderBits %li.\n", (SInt32)rtpHeaderBits ); + pPacketOutBuf += 2; + +- tempInt16 = htons(hdrData.rtpSequenceNumber); ++ tempInt16 = bswap_16(hdrData.rtpSequenceNumber); + COPY_WORD(pPacketOutBuf, &tempInt16); + pPacketOutBuf += 2; + + tempInt32 = rtpTimestamp; + tempInt32 += hdrData.tlvTimestampOffset; // rtpo tlv offset + +- tempInt32 = htonl(tempInt32); ++ tempInt32 = bswap_32(tempInt32); + COPY_LONG_WORD(pPacketOutBuf, &tempInt32); + pPacketOutBuf += 4; + +- tempInt32 = htonl(ssrc); ++ tempInt32 = bswap_32(ssrc); + COPY_LONG_WORD(pPacketOutBuf, &tempInt32); + pPacketOutBuf += 4; + +@@ -1321,7 +1322,7 @@ + else + theFrameType = RTPMetaInfoPacket::kPFrameType; + +- theFrameType = htons(theFrameType); ++ theFrameType = bswap_16(theFrameType); + this->WriteMetaInfoField(RTPMetaInfoPacket::kFrameTypeField, htcb->fRTPMetaInfoFieldArray[fieldCount], &theFrameType, sizeof(theFrameType), &pPacketOutBuf); + break; + } +@@ -1333,7 +1334,7 @@ + } + case RTPMetaInfoPacket::kSeqNumField: + { +- tempInt16 = htons(hdrData.rtpSequenceNumber); ++ tempInt16 = bswap_16(hdrData.rtpSequenceNumber); + this->WriteMetaInfoField(RTPMetaInfoPacket::kSeqNumField, htcb->fRTPMetaInfoFieldArray[fieldCount], &tempInt16, sizeof(tempInt16), &pPacketOutBuf); + break; + } +@@ -1365,7 +1366,7 @@ + { + // Sample Mode + MOVE_WORD( tempInt16, pSampleBuffer + 2); +- tempInt16 = ntohs(tempInt16); ++ tempInt16 = bswap_16(tempInt16); + + DEEP_DEBUG_PRINT (( "QTHintTrack::GetPacket - ....Sample entry found (size=%u)\n", tempInt16 ) ); + packetSize += tempInt16; +@@ -1402,7 +1403,7 @@ + + // Sample Description Data Mode + MOVE_WORD( tempInt16, pSampleBuffer + 2); +- tempInt16 = ntohs(tempInt16); ++ tempInt16 = bswap_16(tempInt16); + + DEEP_DEBUG_PRINT(("QTHintTrack::GetPacket - ....Sample Description entry found (size=%u)\n", tempInt16)); + packetSize += tempInt16; +@@ -1451,7 +1452,7 @@ + else + { + // If we do have md, make sure to put the right length in the right place +- thePacketDataLen = htons(thePacketDataLen); ++ thePacketDataLen = bswap_16(thePacketDataLen); + COPY_WORD(endOfMetaInfo - 2, &thePacketDataLen); + } + } +@@ -1469,10 +1470,10 @@ + { + // + // Write an uncompressed field +- RTPMetaInfoPacket::FieldName theName = htons(RTPMetaInfoPacket::GetFieldNameForIndex(inFieldIndex)); ++ RTPMetaInfoPacket::FieldName theName = bswap_16(RTPMetaInfoPacket::GetFieldNameForIndex(inFieldIndex)); + COPY_WORD(*ioBuffer, &theName); + (*ioBuffer)+=2; +- UInt16 theLen = htons((UInt16)inFieldLen); ++ UInt16 theLen = bswap_16((UInt16)inFieldLen); + COPY_WORD(*ioBuffer, &theLen); + (*ioBuffer)+=2; + } +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTRTPFile.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTRTPFile.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileLib/QTRTPFile.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileLib/QTRTPFile.cpp 2008-05-30 23:57:06.000000000 +0200 +@@ -31,6 +31,8 @@ + // ------------------------------------- + // Includes + // ++#include ++#include + #include + #include + #include "SafeStdLib.h" +@@ -604,7 +606,7 @@ + // Verify that this is an SDP atom. + fFile->Read(globalSDPTOCEntry->AtomDataPos, (char *)&tempAtomType, 4); + +- if ( ntohl(tempAtomType) == FOUR_CHARS_TO_INT('s', 'd', 'p', ' ') ) ++ if ( bswap_32(tempAtomType) == FOUR_CHARS_TO_INT('s', 'd', 'p', ' ') ) + { + haveGlobalSDPAtom = true; + fSDPFileLength += (UInt32) (globalSDPTOCEntry->AtomDataLength - 4); +@@ -1178,7 +1180,7 @@ + if (trackEntry->CurPacket) // we have the packet + { + timeStampP = (UInt32 *)((char *)trackEntry->CurPacket + 4); +- rtpTimestamp = ntohl(*timeStampP); ++ rtpTimestamp = bswap_32(*timeStampP); + } + else + { +@@ -1244,7 +1246,7 @@ + // Read the sequence number right out of the packet. + ::memcpy(&rtpSequenceNumber, (char *)trackEntry->CurPacket + 2, 2); + +- return ntohs(rtpSequenceNumber); ++ return bswap_16(rtpSequenceNumber); + } + + Float64 QTRTPFile::GetNextPacket(char ** outPacket, int * outPacketLength) +@@ -1297,7 +1299,7 @@ + + // + // Remember the sequence number of this packet. +- firstPacket->LastSequenceNumber = ntohs(*(UInt16 *)((char *)firstPacket->CurPacket + 2)); ++ firstPacket->LastSequenceNumber = bswap_16(*(UInt16 *)((char *)firstPacket->CurPacket + 2)); + firstPacket->LastSequenceNumber -= (UInt16) (firstPacket->BaseSequenceNumberRandomOffset + firstPacket->FileSequenceNumberRandomOffset + firstPacket->SequenceNumberAdditive); + + // +@@ -1533,10 +1535,10 @@ + pTimestamp = (UInt32 *)((char *)trackEntry->CurPacket + 4); + + if( doSeek || (trackEntry->QualityLevel > kAllPackets) ) +- trackEntry->SequenceNumberAdditive += (trackEntry->LastSequenceNumber + 1) - ntohs(*pSequenceNumber); ++ trackEntry->SequenceNumberAdditive += (trackEntry->LastSequenceNumber + 1) - bswap_16(*pSequenceNumber); + +- *pSequenceNumber = htons( (SInt16) (((SInt32) ntohs(*pSequenceNumber)) + trackEntry->BaseSequenceNumberRandomOffset + trackEntry->FileSequenceNumberRandomOffset + trackEntry->SequenceNumberAdditive)); +- *pTimestamp = htonl(ntohl(*pTimestamp) + trackEntry->BaseTimestampRandomOffset + trackEntry->FileTimestampRandomOffset); ++ *pSequenceNumber = bswap_16( (SInt16) (((SInt32) bswap_16(*pSequenceNumber)) + trackEntry->BaseSequenceNumberRandomOffset + trackEntry->FileSequenceNumberRandomOffset + trackEntry->SequenceNumberAdditive)); ++ *pTimestamp = bswap_32(bswap_32(*pTimestamp) + trackEntry->BaseTimestampRandomOffset + trackEntry->FileTimestampRandomOffset); + + // + // Return the packet. +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileTools/QTBroadcaster.tproj/QTBroadcaster.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileTools/QTBroadcaster.tproj/QTBroadcaster.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileTools/QTBroadcaster.tproj/QTBroadcaster.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileTools/QTBroadcaster.tproj/QTBroadcaster.cpp 2008-05-30 23:44:47.000000000 +0200 +@@ -23,6 +23,7 @@ + * + */ + ++#include + #include + #include + #include "SafeStdLib.h" +@@ -204,7 +205,7 @@ + UInt32 value = RTPFile->GetLastPacketTrack()->Cookie2; + + in_port_t cookievalue = value; +- sin.sin_port = htons( cookievalue ); ++ sin.sin_port = bswap_16( cookievalue ); + sin.sin_addr.s_addr = inet_addr(IPAddress); + sendto(s, Packet, PacketLength, 0, (struct sockaddr *)&sin, sizeof(struct sockaddr)); + } +diff -ur DarwinStreamingSrvr6.0.3-Source/QTFileTools/QTRTPFileTest.tproj/QTRTPFileTest.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileTools/QTRTPFileTest.tproj/QTRTPFileTest.cpp +--- DarwinStreamingSrvr6.0.3-Source/QTFileTools/QTRTPFileTest.tproj/QTRTPFileTest.cpp 2008-05-06 01:28:58.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/QTFileTools/QTRTPFileTest.tproj/QTRTPFileTest.cpp 2008-05-30 23:45:12.000000000 +0200 +@@ -23,6 +23,7 @@ + * + */ + ++#include + #include + #include + #include "SafeStdLib.h" +@@ -203,7 +204,7 @@ + break; + } + +- RTPFile->SetTrackCookies(hinttracks[trackcount], (char *)hinttracks[trackcount], 0); ++ RTPFile->SetTrackCookies(hinttracks[trackcount], (char *)intptr_t(hinttracks[trackcount]), 0); + (void)RTPFile->GetSeekTimestamp(hinttracks[trackcount]); + trackcount --; + } +@@ -228,7 +229,7 @@ + } + + RTPFile->FindTrackEntry(atoi(*argv), &trackListEntry); +- RTPFile->SetTrackCookies(atoi(*argv), (char *)atoi(*argv), 0); ++ RTPFile->SetTrackCookies(atoi(*argv), (char *)intptr_t(atoi(*argv)), 0); + (void)RTPFile->GetSeekTimestamp(atoi(*argv)); + argv++; + } +@@ -293,9 +294,9 @@ + } + + memcpy(&RTPSequenceNumber, Packet + 2, 2); +- RTPSequenceNumber = ntohs(RTPSequenceNumber); ++ RTPSequenceNumber = bswap_16(RTPSequenceNumber); + memcpy(&RTPTimestamp, Packet + 4, 4); +- RTPTimestamp = ntohl(RTPTimestamp); ++ RTPTimestamp = bswap_32(RTPTimestamp); + + if (!hintOnly) + if (!silent) +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAckPacket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAckPacket.cpp +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAckPacket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAckPacket.cpp 2008-05-30 23:45:39.000000000 +0200 +@@ -31,6 +31,7 @@ + */ + + ++#include + #include "RTCPAckPacket.h" + #include "RTCPPacket.h" + #include "MyAssert.h" +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAckPacketFmt.h DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAckPacketFmt.h +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAckPacketFmt.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAckPacketFmt.h 2008-05-30 23:58:15.000000000 +0200 +@@ -31,6 +31,7 @@ + #ifndef _RTCPACKPACKETFMT_H_ + #define _RTCPACKPACKETFMT_H_ + ++#include + #include + #include + #include "StrPtrLen.h" +@@ -85,15 +86,15 @@ + //fill in the header + RTCPAckHeader &header = *reinterpret_cast(fBuf.Ptr); + ::memset(&header, 0, sizeof(header)); +- header.ackheader = htons(0x80CC); //(RTP_VERSION << 14) + RTCP_APP; +- header.length = htons(GetPacketLen() / 4 - 1); +- header.name = htonl(FOUR_CHARS_TO_INT('q', 't', 'a', 'k')); ++ header.ackheader = bswap_16(0x80CC); //(RTP_VERSION << 14) + RTCP_APP; ++ header.length = bswap_16(GetPacketLen() / 4 - 1); ++ header.name = bswap_32(FOUR_CHARS_TO_INT('q', 't', 'a', 'k')); + } + + void SetSSRC(UInt32 SSRC) + { + RTCPAckHeader &header = *reinterpret_cast(fBuf.Ptr); +- header.SSRC = htonl(SSRC); ++ header.SSRC = bswap_32(SSRC); + } + + //Can handle duplicates +@@ -103,8 +104,8 @@ + ::qsort(AckList.begin(), AckList.size(), sizeof(UInt32), UInt32Compare); + + RTCPAckHeader &header = *reinterpret_cast(fBuf.Ptr); +- header.SSRC1 = htonl(serverSSRC); +- header.seqNum = htons(static_cast(AckList.front())); ++ header.SSRC1 = bswap_32(serverSSRC); ++ header.seqNum = bswap_16(static_cast(AckList.front())); + + fBitMaskSize = 0; + if (AckList.front() == AckList.back()) //no mask is needed +@@ -114,7 +115,7 @@ + UInt32 slotsInMaskNeeded = AckList.back() - AckList.front(); + fBitMaskSize = slotsInMaskNeeded % 32 == 0 ? (slotsInMaskNeeded / 32) * 4 : (slotsInMaskNeeded / 32 + 1) * 4; + +- header.length = htons(GetPacketLen() / 4 - 1); ++ header.length = bswap_16(GetPacketLen() / 4 - 1); + Assert(fBuf.Len >= GetPacketLen()); + + UInt32 *mask = reinterpret_cast(fBuf.Ptr + sizeof(RTCPAckHeader)); +@@ -135,7 +136,7 @@ + + //restore big-endianess of the mask + for(UInt32 i = 0; i < fBitMaskSize / 4; ++i) +- mask[i] = htonl(mask[i]); ++ mask[i] = bswap_32(mask[i]); + } + + //The length of packet written out +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAckPacket.h DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAckPacket.h +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAckPacket.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAckPacket.h 2008-05-30 23:45:47.000000000 +0200 +@@ -34,6 +34,7 @@ + #ifndef _RTCPACKPACKET_H_ + #define _RTCPACKPACKET_H_ + ++#include + #include "OSHeaders.h" + #include "RTCPAPPPacket.h" + #include +@@ -116,12 +117,12 @@ + + UInt16 RTCPAckPacket::GetAckSeqNum() + { +- return (UInt16) (ntohl(*(UInt32*)&fRTCPAckBuffer[kAckSeqNumOffset])); ++ return (UInt16) (bswap_32(*(UInt32*)&fRTCPAckBuffer[kAckSeqNumOffset])); + } + + inline UInt16 RTCPAckPacket::GetPacketLength() + { +- return (UInt16) ( ntohl(*(UInt32*)fRTCPAckBuffer) & kPacketLengthMask); ++ return (UInt16) ( bswap_32(*(UInt32*)fRTCPAckBuffer) & kPacketLengthMask); + } + + +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp 2008-05-30 23:50:26.000000000 +0200 +@@ -31,6 +31,7 @@ + */ + + ++#include + #include "RTCPAPPNADUPacket.h" + #include "MyAssert.h" + #include "OS.h" +@@ -131,46 +132,46 @@ + UInt32 *theWriterStart = (UInt32*)sRTCPTestBuffer; + UInt32 *theWriter = (UInt32*)sRTCPTestBuffer; + +- *(theWriter++) = htonl(0x81c90007); // 1 RR packet header, full report +- *(theWriter++) = htonl(0x2935F2D6); // 1 Sender SSRC = 691401430 +- *(theWriter++) = htonl(0x6078CE22); // 1 SSRC_1 = 1618529826 +- *(theWriter++) = htonl(0x01000001); // fraction lost | cumulative num packets lost 1% , 1 packet +- *(theWriter++) = htonl(0x0000361A); // extended highest seq number received = 13850 +- *(theWriter++) = htonl(0x00C7ED4D); // interarrival jitter = 13102413 +- *(theWriter++) = htonl(0x00000000); // LSR last sender report = 0 +- *(theWriter++) = htonl(0x04625238); // Delay since last SR (DLSR) = 73552440 (garbage) +- +- *(theWriter++) = htonl(0x81ca0005); // 1 SDES packet header, +- *(theWriter++) = htonl(0x2935F2D6); // 1 Sender SSRC = 691401430 +- *(theWriter++) = htonl(0x010A5344); // 1 CNAME = 01, len=10, "SD" +- *(theWriter++) = htonl(0x45532043); // 1 CNAME = "ES C" +- *(theWriter++) = htonl(0x4e414d45); // 1 CNAME = "NAME" +- *(theWriter++) = htonl(0x00000000); // NULL item = end of list + 32bit padding ++ *(theWriter++) = bswap_32(0x81c90007); // 1 RR packet header, full report ++ *(theWriter++) = bswap_32(0x2935F2D6); // 1 Sender SSRC = 691401430 ++ *(theWriter++) = bswap_32(0x6078CE22); // 1 SSRC_1 = 1618529826 ++ *(theWriter++) = bswap_32(0x01000001); // fraction lost | cumulative num packets lost 1% , 1 packet ++ *(theWriter++) = bswap_32(0x0000361A); // extended highest seq number received = 13850 ++ *(theWriter++) = bswap_32(0x00C7ED4D); // interarrival jitter = 13102413 ++ *(theWriter++) = bswap_32(0x00000000); // LSR last sender report = 0 ++ *(theWriter++) = bswap_32(0x04625238); // Delay since last SR (DLSR) = 73552440 (garbage) ++ ++ *(theWriter++) = bswap_32(0x81ca0005); // 1 SDES packet header, ++ *(theWriter++) = bswap_32(0x2935F2D6); // 1 Sender SSRC = 691401430 ++ *(theWriter++) = bswap_32(0x010A5344); // 1 CNAME = 01, len=10, "SD" ++ *(theWriter++) = bswap_32(0x45532043); // 1 CNAME = "ES C" ++ *(theWriter++) = bswap_32(0x4e414d45); // 1 CNAME = "NAME" ++ *(theWriter++) = bswap_32(0x00000000); // NULL item = end of list + 32bit padding + + + +- *(theWriter++) = htonl(0x80CC0000); // 1 APP packet header, needs len -> assigned beow ++ *(theWriter++) = bswap_32(0x80CC0000); // 1 APP packet header, needs len -> assigned beow + + UInt32 *appPacketLenStart = theWriter; + +- *(theWriter++) = htonl(FOUR_CHARS_TO_INT('S', 'S', 'R', 'C')); //nadu ssrc +- *(theWriter++) = htonl(FOUR_CHARS_TO_INT('P', 'S', 'S', '0')); //nadu app packet name ++ *(theWriter++) = bswap_32(FOUR_CHARS_TO_INT('S', 'S', 'R', 'C')); //nadu ssrc ++ *(theWriter++) = bswap_32(FOUR_CHARS_TO_INT('P', 'S', 'S', '0')); //nadu app packet name + + // first (typically only) ssrc block +- *(theWriter++) = htonl(0x423A35C7); //ssrc = 1111111111 +- *(theWriter++) = htonl(0x2B6756CE); //delay | nsn = 11111 | 22222 +- *(theWriter++) = htonl(0xFFFFAD9C); //nun | fbs= 31 | 44444 ++ *(theWriter++) = bswap_32(0x423A35C7); //ssrc = 1111111111 ++ *(theWriter++) = bswap_32(0x2B6756CE); //delay | nsn = 11111 | 22222 ++ *(theWriter++) = bswap_32(0xFFFFAD9C); //nun | fbs= 31 | 44444 + + // optional 2nd or more ssrc blocks +- *(theWriter++) = htonl(0x84746B8E); //ssrc = 222222222 +- *(theWriter++) = htonl(0x2B6756CE); //delay | nsn = 11111 | 22222 +- *(theWriter++) = htonl(0xFFFFAD9C); //nun | fbs= 31 | 44444 ++ *(theWriter++) = bswap_32(0x84746B8E); //ssrc = 222222222 ++ *(theWriter++) = bswap_32(0x2B6756CE); //delay | nsn = 11111 | 22222 ++ *(theWriter++) = bswap_32(0xFFFFAD9C); //nun | fbs= 31 | 44444 + + UInt16 *packetLenOffsetPtr = &( (UInt16*)theWriterStart)[29]; +- UInt16 packetLenInWords = htons( ((UInt32*)theWriter - (UInt32*)appPacketLenStart) ) ; ++ UInt16 packetLenInWords = bswap_16( ((UInt32*)theWriter - (UInt32*)appPacketLenStart) ) ; + + *packetLenOffsetPtr = packetLenInWords; +- qtss_printf("packetLenInWords =%lu\n", ntohs(packetLenInWords)); ++ qtss_printf("packetLenInWords =%lu\n", bswap_16(packetLenInWords)); + UInt32 len = (char*)theWriter - (char*)theWriterStart; + if (resultPtr) + resultPtr->Set(sRTCPTestBuffer, len); +@@ -181,36 +182,36 @@ + UInt32 *theWriterStart = (UInt32*)sRTCPTestBuffer; + UInt32 *theWriter = (UInt32*)sRTCPTestBuffer; + +- *(theWriter++) = htonl(0x80c90007); // 1 RR packet header, empty len is ok but could be a full report +- *(theWriter++) = htonl(0x2935F2D6); // 1 SSRC = 691401430 +- *(theWriter++) = htonl(0x6078CE22); // 1 SSRC_1 = 1618529826 +- *(theWriter++) = htonl(0x01000001); // fraction lost | cumulative num packets lost 1% , 1 packet +- *(theWriter++) = htonl(0x0000361A); // extended highest seq number received = 13850 +- *(theWriter++) = htonl(0x00C7ED4D); // interarrival jitter = 13102413 +- *(theWriter++) = htonl(0x00000000); // LSR last sender report = 0 +- *(theWriter++) = htonl(0x04625238); // Delay since last SR (DLSR) = 73552440 (garbage) ++ *(theWriter++) = bswap_32(0x80c90007); // 1 RR packet header, empty len is ok but could be a full report ++ *(theWriter++) = bswap_32(0x2935F2D6); // 1 SSRC = 691401430 ++ *(theWriter++) = bswap_32(0x6078CE22); // 1 SSRC_1 = 1618529826 ++ *(theWriter++) = bswap_32(0x01000001); // fraction lost | cumulative num packets lost 1% , 1 packet ++ *(theWriter++) = bswap_32(0x0000361A); // extended highest seq number received = 13850 ++ *(theWriter++) = bswap_32(0x00C7ED4D); // interarrival jitter = 13102413 ++ *(theWriter++) = bswap_32(0x00000000); // LSR last sender report = 0 ++ *(theWriter++) = bswap_32(0x04625238); // Delay since last SR (DLSR) = 73552440 (garbage) + + + +- *(theWriter++) = htonl(0x80CC0000); // 1 APP packet header, needs len -> assigned beow ++ *(theWriter++) = bswap_32(0x80CC0000); // 1 APP packet header, needs len -> assigned beow + + UInt32 *appPacketLenStart = theWriter; + +- *(theWriter++) = htonl(FOUR_CHARS_TO_INT('S', 'S', 'R', 'C')); //nadu ssrc +- *(theWriter++) = htonl(FOUR_CHARS_TO_INT('P', 'S', 'S', '0')); //nadu app packet name ++ *(theWriter++) = bswap_32(FOUR_CHARS_TO_INT('S', 'S', 'R', 'C')); //nadu ssrc ++ *(theWriter++) = bswap_32(FOUR_CHARS_TO_INT('P', 'S', 'S', '0')); //nadu app packet name + + // first (typically only) ssrc block +- *(theWriter++) = htonl(0x423A35C7); //ssrc = 1111111111 +- *(theWriter++) = htonl(0x2B6756CE); //delay | nsn = 11111 | 22222 +- *(theWriter++) = htonl(0xFFFFAD9C); //nun | fbs= 31 | 44444 ++ *(theWriter++) = bswap_32(0x423A35C7); //ssrc = 1111111111 ++ *(theWriter++) = bswap_32(0x2B6756CE); //delay | nsn = 11111 | 22222 ++ *(theWriter++) = bswap_32(0xFFFFAD9C); //nun | fbs= 31 | 44444 + + // optional 2nd or more ssrc blocks +- *(theWriter++) = htonl(0x84746B8E); //ssrc = 222222222 +- *(theWriter++) = htonl(0x2B6756CE); //delay | nsn = 11111 | 22222 +- *(theWriter++) = htonl(0xFFFFAD9C); //nun | fbs= 31 | 44444 ++ *(theWriter++) = bswap_32(0x84746B8E); //ssrc = 222222222 ++ *(theWriter++) = bswap_32(0x2B6756CE); //delay | nsn = 11111 | 22222 ++ *(theWriter++) = bswap_32(0xFFFFAD9C); //nun | fbs= 31 | 44444 + + UInt16 *packetLenOffsetPtr = &( (UInt16*)theWriterStart)[17]; +- UInt16 packetLenInWords = htons( (UInt32*)theWriter - (UInt32*)appPacketLenStart) ; ++ UInt16 packetLenInWords = bswap_16( (UInt32*)theWriter - (UInt32*)appPacketLenStart) ; + + *packetLenOffsetPtr = packetLenInWords; + +@@ -224,27 +225,27 @@ + UInt32 *theWriterStart = (UInt32*)sRTCPTestBuffer; + UInt32 *theWriter = (UInt32*)sRTCPTestBuffer; + +- *(theWriter++) = htonl(0x80c90000); // 1 RR packet header, empty len is ok but could be a full report ++ *(theWriter++) = bswap_32(0x80c90000); // 1 RR packet header, empty len is ok but could be a full report + +- *(theWriter++) = htonl(0x80CC0000); // 1 APP packet header, needs len -> assigned beow ++ *(theWriter++) = bswap_32(0x80CC0000); // 1 APP packet header, needs len -> assigned beow + + UInt32 *appPacketLenStart = theWriter; + +- *(theWriter++) = htonl(FOUR_CHARS_TO_INT('S', 'S', 'R', 'C')); //nadu ssrc +- *(theWriter++) = htonl(FOUR_CHARS_TO_INT('P', 'S', 'S', '0')); //nadu app packet name ++ *(theWriter++) = bswap_32(FOUR_CHARS_TO_INT('S', 'S', 'R', 'C')); //nadu ssrc ++ *(theWriter++) = bswap_32(FOUR_CHARS_TO_INT('P', 'S', 'S', '0')); //nadu app packet name + + // first (typically only) ssrc block +- *(theWriter++) = htonl(0x423A35C7); //ssrc = 1111111111 +- *(theWriter++) = htonl(0x2B6756CE); //delay | nsn = 11111 | 22222 +- *(theWriter++) = htonl(0xFFFFAD9C); //nun | fbs= 31 | 44444 ++ *(theWriter++) = bswap_32(0x423A35C7); //ssrc = 1111111111 ++ *(theWriter++) = bswap_32(0x2B6756CE); //delay | nsn = 11111 | 22222 ++ *(theWriter++) = bswap_32(0xFFFFAD9C); //nun | fbs= 31 | 44444 + + // optional 2nd or more ssrc blocks +- *(theWriter++) = htonl(0x84746B8E); //ssrc = 222222222 +- *(theWriter++) = htonl(0x2B6756CE); //delay | nsn = 11111 | 22222 +- *(theWriter++) = htonl(0xFFFFAD9C); //nun | fbs= 31 | 44444 ++ *(theWriter++) = bswap_32(0x84746B8E); //ssrc = 222222222 ++ *(theWriter++) = bswap_32(0x2B6756CE); //delay | nsn = 11111 | 22222 ++ *(theWriter++) = bswap_32(0xFFFFAD9C); //nun | fbs= 31 | 44444 + + UInt16 *packetLenOffsetPtr = &( (UInt16*)theWriterStart)[3]; +- UInt16 packetLenInWords = htons( (UInt32*)theWriter - (UInt32*)appPacketLenStart) ; ++ UInt16 packetLenInWords = bswap_16( (UInt32*)theWriter - (UInt32*)appPacketLenStart) ; + + *packetLenOffsetPtr = packetLenInWords; + +@@ -375,7 +376,7 @@ + for (; count < fNumBlocks ; count ++) + { + blockBuffer = fNaduDataBuffer + (count * 3); +- ssrc = (UInt32) ntohl(*(UInt32*)&blockBuffer[kOffsetNaduSSRC]); ++ ssrc = (UInt32) bswap_32(*(UInt32*)&blockBuffer[kOffsetNaduSSRC]); + + if (ssrc == inSSRC) + return count; +@@ -398,7 +399,7 @@ + return 0; + + UInt32 *blockBufferPtr = fNaduDataBuffer + (index * 3); +- UInt32 ssrc = (UInt32) ntohl(*(UInt32*)&blockBufferPtr[kOffsetNaduSSRC]); ++ UInt32 ssrc = (UInt32) bswap_32(*(UInt32*)&blockBufferPtr[kOffsetNaduSSRC]); + + return ssrc; + +@@ -416,7 +417,7 @@ + return 0; + + UInt32 *blockBufferPtr = fNaduDataBuffer + (index * 3); +- UInt16 delay = (UInt16) ( ( ntohl(*(UInt32*)&blockBufferPtr[kOffsetNaduPlayoutDelay]) & kPlayoutMask) >> 16); ++ UInt16 delay = (UInt16) ( ( bswap_32(*(UInt32*)&blockBufferPtr[kOffsetNaduPlayoutDelay]) & kPlayoutMask) >> 16); + + return delay; + } +@@ -433,7 +434,7 @@ + return 0; + + UInt32 *blockBufferPtr = fNaduDataBuffer + (index * 3); +- UInt16 nsn = (UInt16) ( ntohl(blockBufferPtr[kOffsetNSN]) & kNSNMask ); ++ UInt16 nsn = (UInt16) ( bswap_32(blockBufferPtr[kOffsetNSN]) & kNSNMask ); + + return nsn; + } +@@ -450,7 +451,7 @@ + return 0; + + UInt32 *blockBufferPtr = fNaduDataBuffer + (index * 3); +- UInt16 nun = (UInt16) ((ntohl(blockBufferPtr[kOffsetNUN]) & kNUNMask) >> 16); ++ UInt16 nun = (UInt16) ((bswap_32(blockBufferPtr[kOffsetNUN]) & kNUNMask) >> 16); + + return nun; + } +@@ -467,7 +468,7 @@ + return 0; + + UInt32 *blockBufferPtr = fNaduDataBuffer + (index * 3); +- UInt16 fbs = (UInt16) ntohl(blockBufferPtr[kOffsetFBS]) & kFBSMask; ++ UInt16 fbs = (UInt16) bswap_32(blockBufferPtr[kOffsetFBS]) & kFBSMask; + + return fbs; + } +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPPacket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPPacket.cpp +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPPacket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPPacket.cpp 2008-05-30 23:46:00.000000000 +0200 +@@ -31,6 +31,7 @@ + */ + + ++#include + #include "RTCPAPPPacket.h" + #include "MyAssert.h" + #include "OS.h" +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPPacket.h DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPPacket.h +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPPacket.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPPacket.h 2008-05-30 23:46:06.000000000 +0200 +@@ -34,6 +34,7 @@ + #ifndef _RTCPAPPPACKET_H_ + #define _RTCPAPPPACKET_H_ + ++#include + #include "RTCPPacket.h" + #include "StrPtrLen.h" + #include "ResizeableStringFormatter.h" +@@ -93,13 +94,13 @@ + outName[0] = 0; + } + +- return ntohl(packetName); ++ return bswap_32(packetName); + } + + + inline UInt32 RTCPAPPPacket::GetAppPacketSSRC() + { +- return (UInt32) ntohl(*(UInt32*)&(GetPacketBuffer()[kAppSSRCOffset]) ) ; ++ return (UInt32) bswap_32(*(UInt32*)&(GetPacketBuffer()[kAppSSRCOffset]) ) ; + } + + +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp 2008-05-30 23:50:02.000000000 +0200 +@@ -31,6 +31,7 @@ + */ + + ++#include + #include "RTCPAPPQTSSPacket.h" + #include "MyAssert.h" + #include "OS.h" +@@ -120,7 +121,7 @@ + // DMS - There is no guarentee that qtssDataBuffer will be 4 byte aligned, because + // individual APP packet fields can be 6 bytes or 4 bytes or 8 bytes. So we have to + // use the 4-byte align protection functions. Sparc and MIPS processors will crash otherwise +- UInt32 theHeader = ntohl(OS::GetUInt32FromMemory((UInt32*)&qtssDataBuffer[kQTSSItemTypeOffset])); ++ UInt32 theHeader = bswap_32(OS::GetUInt32FromMemory((UInt32*)&qtssDataBuffer[kQTSSItemTypeOffset])); + UInt16 itemType = (UInt16)((theHeader & kQTSSItemTypeMask) >> kQTSSItemTypeShift); + UInt8 itemVersion = (UInt8)((theHeader & kQTSSItemVersionMask) >> kQTSSItemVersionShift); + UInt8 itemLengthInBytes = (UInt8)(theHeader & kQTSSItemLengthMask); +@@ -144,7 +145,7 @@ + { + case TW0_CHARS_TO_INT( 'r', 'r' ): //'rr': //'rrcv': + { +- fReceiverBitRate = ntohl(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); ++ fReceiverBitRate = bswap_32(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); + qtssDataBuffer += sizeof(fReceiverBitRate); + APPEND_TO_DUMP_ARRAY(", rcvr_bit_rate=%"_U32BITARG_"", fReceiverBitRate); + } +@@ -152,7 +153,7 @@ + + case TW0_CHARS_TO_INT('l', 't'): //'lt': //'late': + { +- fAverageLateMilliseconds = ntohs(*(UInt16*)qtssDataBuffer); ++ fAverageLateMilliseconds = bswap_16(*(UInt16*)qtssDataBuffer); + qtssDataBuffer += sizeof(fAverageLateMilliseconds); + APPEND_TO_DUMP_ARRAY(", avg_late=%u", fAverageLateMilliseconds); + } +@@ -160,7 +161,7 @@ + + case TW0_CHARS_TO_INT('l', 's'): // 'ls': //'loss': + { +- fPercentPacketsLost = ntohs(*(UInt16*)qtssDataBuffer); ++ fPercentPacketsLost = bswap_16(*(UInt16*)qtssDataBuffer); + qtssDataBuffer += sizeof(fPercentPacketsLost); + APPEND_TO_DUMP_ARRAY(", percent_loss=%u", fPercentPacketsLost); + } +@@ -168,7 +169,7 @@ + + case TW0_CHARS_TO_INT('d', 'l'): //'dl': //'bdly': + { +- fAverageBufferDelayMilliseconds = ntohs(*(UInt16*)qtssDataBuffer); ++ fAverageBufferDelayMilliseconds = bswap_16(*(UInt16*)qtssDataBuffer); + qtssDataBuffer += sizeof(fAverageBufferDelayMilliseconds); + APPEND_TO_DUMP_ARRAY(", avg_buf_delay=%u", fAverageBufferDelayMilliseconds); + } +@@ -196,19 +197,19 @@ + + case TW0_CHARS_TO_INT('e', 'y' ): //'ey': //'eyes': + { +- fNumEyes = ntohl(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); ++ fNumEyes = bswap_32(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); + qtssDataBuffer += sizeof(fNumEyes); + APPEND_TO_DUMP_ARRAY(", eyes=%"_U32BITARG_"", fNumEyes); + + if (itemLengthInBytes >= 2) + { +- fNumEyesActive = ntohl(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); ++ fNumEyesActive = bswap_32(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); + qtssDataBuffer += sizeof(fNumEyesActive); + APPEND_TO_DUMP_ARRAY(", eyes_actv=%"_U32BITARG_"", fNumEyesActive); + } + if (itemLengthInBytes >= 3) + { +- fNumEyesPaused = ntohl(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); ++ fNumEyesPaused = bswap_32(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); + qtssDataBuffer += sizeof(fNumEyesPaused); + APPEND_TO_DUMP_ARRAY(", eyes_pausd=%"_U32BITARG_"", fNumEyesPaused); + } +@@ -217,7 +218,7 @@ + + case TW0_CHARS_TO_INT('p', 'r' ): // 'pr': //'prcv': + { +- fTotalPacketsReceived = ntohl(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); ++ fTotalPacketsReceived = bswap_32(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); + qtssDataBuffer += sizeof(fTotalPacketsReceived); + APPEND_TO_DUMP_ARRAY(", pckts_rcvd=%"_U32BITARG_"", fTotalPacketsReceived); + } +@@ -225,7 +226,7 @@ + + case TW0_CHARS_TO_INT('p', 'd'): //'pd': //'pdrp': + { +- fTotalPacketsDropped = ntohs(*(UInt16*)qtssDataBuffer); ++ fTotalPacketsDropped = bswap_16(*(UInt16*)qtssDataBuffer); + qtssDataBuffer += sizeof(fTotalPacketsDropped); + APPEND_TO_DUMP_ARRAY(", pckts_drppd=%u", fTotalPacketsDropped); + } +@@ -233,7 +234,7 @@ + + case TW0_CHARS_TO_INT('p', 'l'): //'pl': //'p???': + { +- fTotalPacketsLost = ntohs(*(UInt16*)qtssDataBuffer); ++ fTotalPacketsLost = bswap_16(*(UInt16*)qtssDataBuffer); + qtssDataBuffer += sizeof(fTotalPacketsLost); + APPEND_TO_DUMP_ARRAY(", ttl_pckts_lost=%u", fTotalPacketsLost); + } +@@ -242,7 +243,7 @@ + + case TW0_CHARS_TO_INT('b', 'l'): //'bl': //'bufl': + { +- fClientBufferFill = ntohs(*(UInt16*)qtssDataBuffer); ++ fClientBufferFill = bswap_16(*(UInt16*)qtssDataBuffer); + qtssDataBuffer += sizeof(fClientBufferFill); + APPEND_TO_DUMP_ARRAY(", buffr_fill=%u", fClientBufferFill); + } +@@ -251,7 +252,7 @@ + + case TW0_CHARS_TO_INT('f', 'r'): //'fr': //'frat': + { +- fFrameRate = ntohs(*(UInt16*)qtssDataBuffer); ++ fFrameRate = bswap_16(*(UInt16*)qtssDataBuffer); + qtssDataBuffer += sizeof(fFrameRate); + APPEND_TO_DUMP_ARRAY(", frame_rate=%u", fFrameRate); + } +@@ -260,7 +261,7 @@ + + case TW0_CHARS_TO_INT('x', 'r'): //'xr': //'xrat': + { +- fExpectedFrameRate = ntohs(*(UInt16*)qtssDataBuffer); ++ fExpectedFrameRate = bswap_16(*(UInt16*)qtssDataBuffer); + qtssDataBuffer += sizeof(fExpectedFrameRate); + APPEND_TO_DUMP_ARRAY(", xpectd_frame_rate=%u", fExpectedFrameRate); + } +@@ -269,7 +270,7 @@ + + case TW0_CHARS_TO_INT('d', '#'): //'d#': //'dry#': + { +- fAudioDryCount = ntohs(*(UInt16*)qtssDataBuffer); ++ fAudioDryCount = bswap_16(*(UInt16*)qtssDataBuffer); + qtssDataBuffer += sizeof(fAudioDryCount); + APPEND_TO_DUMP_ARRAY(", aud_dry_count=%u", fAudioDryCount); + } +@@ -277,7 +278,7 @@ + + case TW0_CHARS_TO_INT('o', 'b'): //'ob': // overbuffer window size + { +- fOverbufferWindowSize = ntohl(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); ++ fOverbufferWindowSize = bswap_32(OS::GetUInt32FromMemory((UInt32*)qtssDataBuffer)); + qtssDataBuffer += sizeof(fOverbufferWindowSize); + APPEND_TO_DUMP_ARRAY(", ovr_buffr_windw_siz=%"_U32BITARG_"", fOverbufferWindowSize); + } +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPQTSSPacket.h DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPQTSSPacket.h +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPAPPQTSSPacket.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPAPPQTSSPacket.h 2008-05-31 00:02:44.000000000 +0200 +@@ -34,6 +34,7 @@ + #ifndef _RTCPAPPQTSSPACKET_H_ + #define _RTCPAPPQTSSPACKET_H_ + ++#include + #include "RTCPAPPPacket.h" + #include "StrPtrLen.h" + +@@ -143,21 +144,21 @@ + + inline UInt32 RTCPCompressedQTSSPacket::GetQTSSReportSourceID() + { +- return (UInt32) ntohl( ((UInt32*)this->GetPacketBuffer())[kQTSSReportSourceIDOffset] ) ; ++ return (UInt32) bswap_32( ((UInt32*)this->GetPacketBuffer())[kQTSSReportSourceIDOffset] ) ; + } + + + inline UInt16 RTCPCompressedQTSSPacket::GetQTSSPacketVersion() + { + UInt32 field = ((UInt32*)this->GetPacketBuffer())[kQTSSPacketVersionOffset]; +- UInt16 vers = (UInt16) ( ( ntohl(field) & kQTSSPacketVersionMask) >> kQTSSPacketVersionShift ); ++ UInt16 vers = (UInt16) ( ( bswap_32(field) & kQTSSPacketVersionMask) >> kQTSSPacketVersionShift ); + return vers; + } + + inline UInt16 RTCPCompressedQTSSPacket::GetQTSSPacketLength() + { + UInt32 field = ((UInt32*)this->GetPacketBuffer())[kQTSSPacketLengthOffset]; +- return (UInt16) ( (UInt32) ntohl(field) & kQTSSPacketLengthMask ); ++ return (UInt16) ( (UInt32) bswap_32(field) & kQTSSPacketLengthMask ); + } + + /* +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPNADUPacketFmt.h DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPNADUPacketFmt.h +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPNADUPacketFmt.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPNADUPacketFmt.h 2008-05-30 23:57:32.000000000 +0200 +@@ -31,6 +31,7 @@ + #ifndef _RTCPNADUPACKETFMT_H_ + #define _RTCPNADUPACKETFMT_H_ + ++#include + #include "StrPtrLen.h" + #include "arpa/inet.h" + #include "OSHeaders.h" +@@ -89,9 +90,9 @@ + //fill in the header + NADUHeader &header = *reinterpret_cast(fBuf.Ptr); + ::memset(&header, 0, sizeof(header)); +- header.naduHeader = htons(0x80CC); //(RTP_VERSION << 14) + RTCP_APP; +- header.name = htonl(FOUR_CHARS_TO_INT('P', 'S', 'S', '0')); +- header.length = htons(GetPacketLen() / 4 - 1); ++ header.naduHeader = bswap_16(0x80CC); //(RTP_VERSION << 14) + RTCP_APP; ++ header.name = bswap_32(FOUR_CHARS_TO_INT('P', 'S', 'S', '0')); ++ header.length = bswap_16(GetPacketLen() / 4 - 1); + } + + //units are in milliseconds and in bytes; use a playoutDelay of kUInt32_Max if the buffer is empty +@@ -102,22 +103,22 @@ + ::memset(&nadu, 0, sizeof(NADUBlock)); + + fNumNADUBlocks++; +- reinterpret_cast(fBuf.Ptr)->length = htons(GetPacketLen() / 4 - 1); ++ reinterpret_cast(fBuf.Ptr)->length = bswap_16(GetPacketLen() / 4 - 1); + +- nadu.SSRC = htonl(SSRC); +- nadu.NSN = htons(static_cast(nextSeqNum)); +- nadu.NUN = htons(nextUnitNum & 0x1F); ++ nadu.SSRC = bswap_32(SSRC); ++ nadu.NSN = bswap_16(static_cast(nextSeqNum)); ++ nadu.NUN = bswap_16(nextUnitNum & 0x1F); + + //Use reserved value of 0xffff for undefined + playoutDelay = MIN(0xffff, playoutDelay); +- nadu.delay = htons(static_cast(playoutDelay)); ++ nadu.delay = bswap_16(static_cast(playoutDelay)); + + //the free buffer space is reported in 64 bytes blocks, and maximum value is 0xffff + freeBufferSpace = MIN(0xffff, freeBufferSpace / 64); +- nadu.FBS = htons(static_cast(freeBufferSpace)); ++ nadu.FBS = bswap_16(static_cast(freeBufferSpace)); + } + +- void SetSSRC(UInt32 SSRC) { reinterpret_cast(fBuf.Ptr)->SSRC = htonl(SSRC); } ++ void SetSSRC(UInt32 SSRC) { reinterpret_cast(fBuf.Ptr)->SSRC = bswap_32(SSRC); } + + //The length of packet written out + UInt32 GetPacketLen() { return sizeof(NADUHeader) + sizeof(NADUBlock) * fNumNADUBlocks; } +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPPacket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPPacket.cpp +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPPacket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPPacket.cpp 2008-05-31 00:02:17.000000000 +0200 +@@ -30,6 +30,7 @@ + */ + + ++#include + #include "RTCPPacket.h" + #include "RTCPAckPacket.h" + #include "OS.h" +@@ -44,7 +45,7 @@ + return false; + + fReceiverPacketBuffer = inPacketBuffer; +- if (RTCP_PACKET_DEBUG) qtss_printf("RTCPPacket::ParsePacket first 4 bytes of packet=%x \n", ntohl( *(UInt32 *)inPacketBuffer)); ++ if (RTCP_PACKET_DEBUG) qtss_printf("RTCPPacket::ParsePacket first 4 bytes of packet=%x \n", bswap_32( *(UInt32 *)inPacketBuffer)); + + //the length of this packet can be no less than the advertised length (which is + //in 32-bit words, so we must multiply) plus the size of the header (4 bytes) +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPPacket.h DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPPacket.h +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPPacket.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPPacket.h 2008-05-30 23:46:17.000000000 +0200 +@@ -36,6 +36,7 @@ + #ifndef _RTCPPACKET_H_ + #define _RTCPPACKET_H_ + ++#include + #include + #include "SafeStdLib.h" + #ifndef __Win32__ +@@ -185,14 +186,14 @@ + SInt64 GetNTPTimeStamp() + { + UInt32* fieldPtr = (UInt32*)&fReceiverPacketBuffer[kSRPacketNTPTimeStampMSW]; +- SInt64 timestamp = ntohl(*fieldPtr); ++ SInt64 timestamp = bswap_32(*fieldPtr); + fieldPtr = (UInt32*)&fReceiverPacketBuffer[kSRPacketNTPTimeStampLSW]; +- return (timestamp << 32) | ntohl(*fieldPtr); ++ return (timestamp << 32) | bswap_32(*fieldPtr); + } + UInt32 GetRTPTimeStamp() + { + UInt32* fieldPtr = (UInt32*)&fReceiverPacketBuffer[kSRPacketRTPTimeStamp]; +- return ntohl(*fieldPtr); ++ return bswap_32(*fieldPtr); + } + protected: + enum +@@ -209,46 +210,46 @@ + inline int RTCPPacket::GetVersion() + { + UInt32* theVersionPtr = (UInt32*)&fReceiverPacketBuffer[kVersionOffset]; +- UInt32 theVersion = ntohl(*theVersionPtr); ++ UInt32 theVersion = bswap_32(*theVersionPtr); + return (int) ((theVersion & kVersionMask) >> kVersionShift); + } + + inline Bool16 RTCPPacket::GetHasPadding() + { + UInt32* theHasPaddingPtr = (UInt32*)&fReceiverPacketBuffer[kHasPaddingOffset]; +- UInt32 theHasPadding = ntohl(*theHasPaddingPtr); ++ UInt32 theHasPadding = bswap_32(*theHasPaddingPtr); + return (Bool16) (theHasPadding & kHasPaddingMask); + } + + inline int RTCPPacket::GetReportCount() + { + UInt32* theReportCountPtr = (UInt32*)&fReceiverPacketBuffer[kReportCountOffset]; +- UInt32 theReportCount = ntohl(*theReportCountPtr); ++ UInt32 theReportCount = bswap_32(*theReportCountPtr); + return (int) ((theReportCount & kReportCountMask) >> kReportCountShift); + } + + inline UInt8 RTCPPacket::GetPacketType() + { + UInt32* thePacketTypePtr = (UInt32*)&fReceiverPacketBuffer[kPacketTypeOffset]; +- UInt32 thePacketType = ntohl(*thePacketTypePtr); ++ UInt32 thePacketType = bswap_32(*thePacketTypePtr); + return (UInt8) ((thePacketType & kPacketTypeMask) >> kPacketTypeShift); + } + + inline UInt16 RTCPPacket::GetPacketLength() + { + UInt32* fieldPtr = (UInt32*)&fReceiverPacketBuffer[kPacketLengthOffset]; +- UInt32 field = ntohl(*fieldPtr); ++ UInt32 field = bswap_32(*fieldPtr); + return (UInt16) (field & kPacketLengthMask); + } + + inline UInt32 RTCPPacket::GetPacketSSRC() + { + UInt32* fieldPtr = (UInt32*)&fReceiverPacketBuffer[kPacketSourceIDOffset]; +- UInt32 field = ntohl(*fieldPtr); ++ UInt32 field = bswap_32(*fieldPtr); + return field; + } + +-inline SInt16 RTCPPacket::GetHeader(){ return (SInt16) ntohs(*(SInt16*)&fReceiverPacketBuffer[0]) ;} ++inline SInt16 RTCPPacket::GetHeader(){ return (SInt16) bswap_16(*(SInt16*)&fReceiverPacketBuffer[0]) ;} + + /************** RTCPReceiverPacket inlines **************/ + inline int RTCPReceiverPacket::RecordOffset(int inReportNum) +@@ -259,41 +260,41 @@ + + inline UInt32 RTCPReceiverPacket::GetReportSourceID(int inReportNum) + { +- return (UInt32) ntohl(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kReportSourceIDOffset]) ; ++ return (UInt32) bswap_32(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kReportSourceIDOffset]) ; + } + + inline UInt8 RTCPReceiverPacket::GetFractionLostPackets(int inReportNum) + { +- return (UInt8) ( (ntohl(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kFractionLostOffset]) & kFractionLostMask) >> kFractionLostShift ); ++ return (UInt8) ( (bswap_32(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kFractionLostOffset]) & kFractionLostMask) >> kFractionLostShift ); + } + + + inline UInt32 RTCPReceiverPacket::GetTotalLostPackets(int inReportNum) + { +- return (ntohl(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kTotalLostPacketsOffset]) & kTotalLostPacketsMask ); ++ return (bswap_32(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kTotalLostPacketsOffset]) & kTotalLostPacketsMask ); + } + + + inline UInt32 RTCPReceiverPacket::GetHighestSeqNumReceived(int inReportNum) + { +- return (UInt32) ntohl(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kHighestSeqNumReceivedOffset]) ; ++ return (UInt32) bswap_32(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kHighestSeqNumReceivedOffset]) ; + } + + inline UInt32 RTCPReceiverPacket::GetJitter(int inReportNum) + { +- return (UInt32) ntohl(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kJitterOffset]) ; ++ return (UInt32) bswap_32(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kJitterOffset]) ; + } + + + inline UInt32 RTCPReceiverPacket::GetLastSenderReportTime(int inReportNum) + { +- return (UInt32) ntohl(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kLastSenderReportOffset]) ; ++ return (UInt32) bswap_32(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kLastSenderReportOffset]) ; + } + + + inline UInt32 RTCPReceiverPacket::GetLastSenderReportDelay(int inReportNum) + { +- return (UInt32) ntohl(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kLastSenderReportDelayOffset]) ; ++ return (UInt32) bswap_32(*(UInt32*)&fRTCPReceiverReportArray[this->RecordOffset(inReportNum)+kLastSenderReportDelayOffset]) ; + } + + +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPRRPacket.h DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPRRPacket.h +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPRRPacket.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPRRPacket.h 2008-05-30 23:50:45.000000000 +0200 +@@ -31,6 +31,7 @@ + #ifndef _RTCPRRPACKET_H_ + #define _RTCPRRPACKET_H_ + ++#include + #include "StrPtrLen.h" + #include "arpa/inet.h" + #include "OSHeaders.h" +@@ -92,11 +93,11 @@ + //fill in the header + RTCPRRHeader &header = *reinterpret_cast(fBuf.Ptr); + ::memset(&header, 0, sizeof(header)); +- header.rrheader = htons(0x80C9); //(RTP_VERSION << 14) + RTCP_RR; +- header.length = htons(GetPacketLen() / 4 - 1); ++ header.rrheader = bswap_16(0x80C9); //(RTP_VERSION << 14) + RTCP_RR; ++ header.length = bswap_16(GetPacketLen() / 4 - 1); + } + +- void SetSSRC(UInt32 SSRC) { reinterpret_cast(fBuf.Ptr)->SSRC = htonl(SSRC); } ++ void SetSSRC(UInt32 SSRC) { reinterpret_cast(fBuf.Ptr)->SSRC = bswap_32(SSRC); } + + + void SetCount(UInt16 count) +@@ -105,10 +106,10 @@ + { return; + } + +- UInt16 newVal = ntohs(*reinterpret_cast(fBuf.Ptr)); ++ UInt16 newVal = bswap_16(*reinterpret_cast(fBuf.Ptr)); + count <<= 8; + newVal |= count; +- *reinterpret_cast(fBuf.Ptr) = htons(newVal); ++ *reinterpret_cast(fBuf.Ptr) = bswap_16(newVal); + + } + +@@ -122,22 +123,22 @@ + RTCPReportBlock &reportBlock = *reinterpret_cast(fBuf.Ptr + GetPacketLen()); + ::memset(&reportBlock, 0, sizeof(RTCPReportBlock)); + +- reportBlock.ssrc = htonl(SSRC); ++ reportBlock.ssrc = bswap_32(SSRC); + reportBlock.fraction = fractionLost; +- reportBlock.last_seq = htonl(highestSeqNum); +- reportBlock.lsr = htonl(lsr); +- reportBlock.dlsr = htonl(dlsr); ++ reportBlock.last_seq = bswap_32(highestSeqNum); ++ reportBlock.lsr = bswap_32(lsr); ++ reportBlock.dlsr = bswap_32(dlsr); + + //since the cumulative packets lost is a 24 bit signed integer, its clamped between 0x7fffff and 0x800000) + if(cumLostPackets > 0x7fffff) +- reportBlock.lost = htonl(0x7fffff); ++ reportBlock.lost = bswap_32(0x7fffff); + else if (cumLostPackets < static_cast(0xff800000)) +- reportBlock.lost = htonl(0x800000); ++ reportBlock.lost = bswap_32(0x800000); + else +- reportBlock.lost = htonl(cumLostPackets); ++ reportBlock.lost = bswap_32(cumLostPackets); + + SetCount(++fNumReportBlocks); +- reinterpret_cast(fBuf.Ptr)->length = htons(GetPacketLen() / 4 - 1); ++ reinterpret_cast(fBuf.Ptr)->length = bswap_16(GetPacketLen() / 4 - 1); + } + + //The length of packet written out +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPSRPacket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPSRPacket.cpp +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPSRPacket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPSRPacket.cpp 2008-05-30 23:46:29.000000000 +0200 +@@ -33,6 +33,7 @@ + + */ + ++#include + #include + + #include "RTCPSRPacket.h" +@@ -47,11 +48,11 @@ + + //write the SR & SDES headers + UInt32* theSRWriter = (UInt32*)&fSenderReportBuffer; +- *theSRWriter = htonl(0x80c80006); ++ *theSRWriter = bswap_32(0x80c80006); + theSRWriter += 7; //number of UInt32s in an SR. + + //SDES length is the length of the CName, plus 2 32bit words, plus the 32bit word for the SSRC +- *theSRWriter = htonl(0x81ca0000 + (cNameLen >> 2) + 1); ++ *theSRWriter = bswap_32(0x81ca0000 + (cNameLen >> 2) + 1); + ::memcpy(&fSenderReportBuffer[kSenderReportSizeInBytes], theTempCName, cNameLen); + fSenderReportSize = kSenderReportSizeInBytes + cNameLen; + +@@ -72,16 +73,16 @@ + // + // Write the SERVER INFO APP packet + UInt32* theAckInfoWriter = (UInt32*)&fSenderReportBuffer[fSenderReportSize]; +- *theAckInfoWriter = htonl(0x81cc0006); ++ *theAckInfoWriter = bswap_32(0x81cc0006); + theAckInfoWriter += 2; +- *(theAckInfoWriter++) = htonl(FOUR_CHARS_TO_INT('q', 't', 's', 'i')); // Ack Info APP name ++ *(theAckInfoWriter++) = bswap_32(FOUR_CHARS_TO_INT('q', 't', 's', 'i')); // Ack Info APP name + theAckInfoWriter++; // leave space for the ssrc (again) +- *(theAckInfoWriter++) = htonl(2); // 2 UInt32s for the 'at' field +- *(theAckInfoWriter++) = htonl(FOUR_CHARS_TO_INT( 'a', 't', 0, 4 )); ++ *(theAckInfoWriter++) = bswap_32(2); // 2 UInt32s for the 'at' field ++ *(theAckInfoWriter++) = bswap_32(FOUR_CHARS_TO_INT( 'a', 't', 0, 4 )); + fSenderReportWithServerInfoSize = (char*)(theAckInfoWriter+1) - fSenderReportBuffer; + + UInt32* theByeWriter = (UInt32*)&fSenderReportBuffer[fSenderReportWithServerInfoSize]; +- *theByeWriter = htonl(0x81cb0001); ++ *theByeWriter = bswap_32(0x81cb0001); + } + + UInt32 RTCPSRPacket::GetACName(char* ioCNameBuffer) +diff -ur DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPSRPacket.h DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPSRPacket.h +--- DarwinStreamingSrvr6.0.3-Source/RTCPUtilitiesLib/RTCPSRPacket.h 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTCPUtilitiesLib/RTCPSRPacket.h 2008-05-30 23:46:38.000000000 +0200 +@@ -35,6 +35,7 @@ + #ifndef __RTCP_SR_PACKET__ + #define __RTCP_SR_PACKET__ + ++#include + #include "OSHeaders.h" + #include "OS.h" + #include "MyAssert.h" +@@ -109,25 +110,25 @@ + inline void RTCPSRPacket::SetSSRC(UInt32 inSSRC) + { + // Set SSRC in SR +- ((UInt32*)&fSenderReportBuffer)[1] = htonl(inSSRC); ++ ((UInt32*)&fSenderReportBuffer)[1] = bswap_32(inSSRC); + + // Set SSRC in SDES +- ((UInt32*)&fSenderReportBuffer)[8] = htonl(inSSRC); ++ ((UInt32*)&fSenderReportBuffer)[8] = bswap_32(inSSRC); + + // Set SSRC in SERVER INFO + Assert((fSenderReportSize & 3) == 0); +- ((UInt32*)&fSenderReportBuffer)[(fSenderReportSize >> 2) + 1] = htonl(inSSRC); ++ ((UInt32*)&fSenderReportBuffer)[(fSenderReportSize >> 2) + 1] = bswap_32(inSSRC); + + // Set SSRC in BYE + Assert((fSenderReportWithServerInfoSize & 3) == 0); +- ((UInt32*)&fSenderReportBuffer)[(fSenderReportWithServerInfoSize >> 2) + 1] = htonl(inSSRC); ++ ((UInt32*)&fSenderReportBuffer)[(fSenderReportWithServerInfoSize >> 2) + 1] = bswap_32(inSSRC); + } + + inline void RTCPSRPacket::SetClientSSRC(UInt32 inClientSSRC) + { + // + // Set Client SSRC in SERVER INFO +- ((UInt32*)&fSenderReportBuffer)[(fSenderReportSize >> 2) + 3] = htonl(inClientSSRC); ++ ((UInt32*)&fSenderReportBuffer)[(fSenderReportSize >> 2) + 3] = bswap_32(inClientSSRC); + } + + inline void RTCPSRPacket::SetNTPTimestamp(SInt64 inNTPTimestamp) +@@ -142,22 +143,22 @@ + + inline void RTCPSRPacket::SetRTPTimestamp(UInt32 inRTPTimestamp) + { +- ((UInt32*)&fSenderReportBuffer)[4] = htonl(inRTPTimestamp); ++ ((UInt32*)&fSenderReportBuffer)[4] = bswap_32(inRTPTimestamp); + } + + inline void RTCPSRPacket::SetPacketCount(UInt32 inPacketCount) + { +- ((UInt32*)&fSenderReportBuffer)[5] = htonl(inPacketCount); ++ ((UInt32*)&fSenderReportBuffer)[5] = bswap_32(inPacketCount); + } + + inline void RTCPSRPacket::SetByteCount(UInt32 inByteCount) + { +- ((UInt32*)&fSenderReportBuffer)[6] = htonl(inByteCount); ++ ((UInt32*)&fSenderReportBuffer)[6] = bswap_32(inByteCount); + } + + inline void RTCPSRPacket::SetAckTimeout(UInt32 inAckTimeoutInMsec) + { +- ((UInt32*)&fSenderReportBuffer)[(fSenderReportWithServerInfoSize >> 2) - 1] = htonl(inAckTimeoutInMsec); ++ ((UInt32*)&fSenderReportBuffer)[(fSenderReportWithServerInfoSize >> 2) - 1] = bswap_32(inAckTimeoutInMsec); + } + + #endif //__RTCP_SR_PACKET__ +diff -ur DarwinStreamingSrvr6.0.3-Source/RTPMetaInfoLib/RTPMetaInfoPacket.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/RTPMetaInfoLib/RTPMetaInfoPacket.cpp +--- DarwinStreamingSrvr6.0.3-Source/RTPMetaInfoLib/RTPMetaInfoPacket.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTPMetaInfoLib/RTPMetaInfoPacket.cpp 2008-05-30 23:46:52.000000000 +0200 +@@ -27,6 +27,7 @@ + // Some defs for RTP-Meta-Info payloads. + + ++#include + #include "RTPMetaInfoPacket.h" + #include "MyAssert.h" + #include "StringParser.h" +@@ -93,8 +94,8 @@ + // + // Extract the Field Name and convert it to a Field Index + ::memcpy (&fieldNameValue, theFieldP.Ptr, sizeof(UInt16)); +- FieldIndex theIndex = RTPMetaInfoPacket::GetFieldIndexForName(ntohs(fieldNameValue)); +-// FieldIndex theIndex = RTPMetaInfoPacket::GetFieldIndexForName(ntohs(*(UInt16*)theFieldP.Ptr)); ++ FieldIndex theIndex = RTPMetaInfoPacket::GetFieldIndexForName(bswap_16(fieldNameValue)); ++// FieldIndex theIndex = RTPMetaInfoPacket::GetFieldIndexForName(bswap_16(*(UInt16*)theFieldP.Ptr)); + + // + // Get the Field ID if there is one. +@@ -153,10 +154,10 @@ + break; + + ::memcpy(&uInt16Val, theFieldP, sizeof(uInt16Val)); +- theFieldIndex = this->GetFieldIndexForName(ntohs(uInt16Val)); ++ theFieldIndex = this->GetFieldIndexForName(bswap_16(uInt16Val)); + + ::memcpy(&uInt16Val, theFieldP + 2, sizeof(uInt16Val)); +- theFieldLen = ntohs(uInt16Val); ++ theFieldLen = bswap_16(uInt16Val); + theFieldP += 4; + } + +@@ -188,7 +189,7 @@ + } + case kFrameTypeField: + { +- fFrameType = ntohs(*((FrameTypeField*)theFieldP)); ++ fFrameType = bswap_16(*((FrameTypeField*)theFieldP)); + break; + } + case kPacketNumField: +@@ -201,7 +202,7 @@ + { + + ::memcpy(&uInt16Val, theFieldP, sizeof(uInt16Val)); +- fSeqNum = ntohs(uInt16Val); ++ fSeqNum = bswap_16(uInt16Val); + break; + } + case kMediaDataField: +diff -ur DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/ClientSession.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/RTSPClientLib/ClientSession.cpp +--- DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/ClientSession.cpp 2008-05-06 01:29:00.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTSPClientLib/ClientSession.cpp 2008-05-30 23:47:13.000000000 +0200 +@@ -31,6 +31,7 @@ + + */ + ++#include + #include + //#include + #include "ClientSession.h" +@@ -985,11 +986,11 @@ + + // RECEIVER REPORT + /* +- *(theWriter++) = htonl(0x81c90007); // 1 src RR packet +- *(theWriter++) = htonl(0); +- *(theWriter++) = htonl(0); +- *(theWriter++) = htonl(0); +- *(theWriter++) = htonl(trackStats.fHighestSeqNum == kUInt32_Max ? 0 : trackStats.fHighestSeqNum); //EHSN ++ *(theWriter++) = bswap_32(0x81c90007); // 1 src RR packet ++ *(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32(trackStats.fHighestSeqNum == kUInt32_Max ? 0 : trackStats.fHighestSeqNum); //EHSN + *(theWriter++) = 0; // don't do jitter yet. + *(theWriter++) = 0; // don't do last SR timestamp + *(theWriter++) = 0; // don't do delay since last SR +@@ -1000,19 +1001,19 @@ + if(fTransportType == kRTSPReliableUDPClientType) + { + // APP PACKET - QoS info +- *(theWriter++) = htonl(0x80CC000C); +- //*(ia++) = htonl(trk[i].TrackSSRC); +- *(theWriter++) = htonl(trackStats.fClientSSRC); ++ *(theWriter++) = bswap_32(0x80CC000C); ++ //*(ia++) = bswap_32(trk[i].TrackSSRC); ++ *(theWriter++) = bswap_32(trackStats.fClientSSRC); + // this QTSS changes after beta to 'qtss' +- *(theWriter++) = htonl(FOUR_CHARS_TO_INT('Q', 'T', 'S', 'S')); ++ *(theWriter++) = bswap_32(FOUR_CHARS_TO_INT('Q', 'T', 'S', 'S')); + //*(ia++) = toBigEndian_ulong(trk[i].rcvrSSRC); +- *(theWriter++) = htonl(trackStats.fServerSSRC); +- *(theWriter++) = htonl(8); // number of 4-byte quants below ++ *(theWriter++) = bswap_32(trackStats.fServerSSRC); ++ *(theWriter++) = bswap_32(8); // number of 4-byte quants below + #define RR 0x72720004 + #define PR 0x70720004 + #define PD 0x70640002 + #define OB 0x6F620004 +- *(theWriter++) = htonl(RR); ++ *(theWriter++) = bswap_32(RR); + //unsigned int now, secs; + //now = microseconds(); + //secs = now - trk[i].last_rtcp_packet_sent_us / USEC_PER_SEC; +@@ -1020,18 +1021,18 @@ + // temp = trk[i].bytes_received_since_last_rtcp / secs; + //else + // temp = 0; +- //*(ia++) = htonl(temp); +- *(theWriter++) = htonl(0); +- *(theWriter++) = htonl(PR); +- //*(ia++) = htonl(trk[i].rtp_num_received); +- *(theWriter++) = htonl(0); +- //*(theWriter++) = htonl(PL); +- //*(ia++) = htonl(trk[i].rtp_num_lost); +- //*(theWriter++) = htonl(0); +- *(theWriter++) = htonl(OB); +- *(theWriter++) = htonl(fOverbufferWindowSizeInK * 1024); +- *(theWriter++) = htonl(PD); +- *(theWriter++) = htonl(0); // should be a short, but we need to pad to a long for the entire RTCP app packet ++ //*(ia++) = bswap_32(temp); ++ *(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32(PR); ++ //*(ia++) = bswap_32(trk[i].rtp_num_received); ++ *(theWriter++) = bswap_32(0); ++ //*(theWriter++) = bswap_32(PL); ++ //*(ia++) = bswap_32(trk[i].rtp_num_lost); ++ //*(theWriter++) = bswap_32(0); ++ *(theWriter++) = bswap_32(OB); ++ *(theWriter++) = bswap_32(fOverbufferWindowSizeInK * 1024); ++ *(theWriter++) = bswap_32(PD); ++ *(theWriter++) = bswap_32(0); // should be a short, but we need to pad to a long for the entire RTCP app packet + } + + char *buf = reinterpret_cast(theWriter); +diff -ur DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/RTPPacket.h DarwinStreamingSrvr6.0.3-Source.x86_64/RTSPClientLib/RTPPacket.h +--- DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/RTPPacket.h 2008-05-06 01:29:00.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTSPClientLib/RTPPacket.h 2008-05-30 23:49:47.000000000 +0200 +@@ -30,6 +30,7 @@ + #ifndef _RTPPACKET_H_ + #define _RTPPACKET_H_ + ++#include + #include "arpa/inet.h" + #include "OSHeaders.h" + #include "StrPtrLen.h" +@@ -74,19 +75,19 @@ + : fPacket(reinterpret_cast(inPacket)), fLen(inLen) + {} + +- UInt8 GetPayloadType() const { return ntohs(fPacket->rtpheader) & 0x007F; } +- UInt8 GetCSRCCount() const { return (ntohs(fPacket->rtpheader) & 0x0F00 ) >> 8; } ++ UInt8 GetPayloadType() const { return bswap_16(fPacket->rtpheader) & 0x007F; } ++ UInt8 GetCSRCCount() const { return (bswap_16(fPacket->rtpheader) & 0x0F00 ) >> 8; } + + //The following get functions will convert from network byte order to host byte order. + //Conversely the set functions will convert from host byte order to network byte order. +- UInt16 GetSeqNum() const { return ntohs(fPacket->seq); } +- void SetSeqNum(UInt16 seqNum) { fPacket->seq = htons(seqNum); } ++ UInt16 GetSeqNum() const { return bswap_16(fPacket->seq); } ++ void SetSeqNum(UInt16 seqNum) { fPacket->seq = bswap_16(seqNum); } + +- UInt32 GetTimeStamp() const { return ntohl(fPacket->ts); } +- void SetTimeStamp(UInt32 timeStamp) { fPacket->ts = htonl(timeStamp); } ++ UInt32 GetTimeStamp() const { return bswap_32(fPacket->ts); } ++ void SetTimeStamp(UInt32 timeStamp) { fPacket->ts = bswap_32(timeStamp); } + +- UInt32 GetSSRC() const { return ntohl(fPacket->ssrc); } +- void SetSSRC(UInt32 SSRC) { fPacket->ssrc = htonl(SSRC); } ++ UInt32 GetSSRC() const { return bswap_32(fPacket->ssrc); } ++ void SetSSRC(UInt32 SSRC) { fPacket->ssrc = bswap_32(SSRC); } + + //Includes the variable CSRC portion + UInt32 GetHeaderLen() const { return sizeof(RTPHeader) + GetCSRCCount() * 4; } +@@ -99,7 +100,7 @@ + Assert(sizeof(RTPHeader) == 12); + if (fLen < sizeof(RTPHeader)) + return false; +- if ( ( ntohs(fPacket->rtpheader) >> 14) != RTP_VERSION ) ++ if ( ( bswap_16(fPacket->rtpheader) >> 14) != RTP_VERSION ) + return false; + if (GetHeaderLen() > fLen) + return false; +diff -ur DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/RTSPClient.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/RTSPClientLib/RTSPClient.cpp +--- DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/RTSPClient.cpp 2008-05-06 01:29:00.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/RTSPClientLib/RTSPClient.cpp 2008-05-30 23:47:22.000000000 +0200 +@@ -31,6 +31,7 @@ + */ + + #ifndef __Win32__ ++#include + #include + #include + #include +@@ -1261,7 +1262,7 @@ + header[0] = '$'; + header[1] = (UInt8)x; + UInt16* theLenP = (UInt16*)header; +- theLenP[1] = htons(inLen); ++ theLenP[1] = bswap_16(inLen); + + // + // Build the iovec +@@ -1301,7 +1302,7 @@ + { *getNext = true; // handle a new packet + fSendBuffer[0] = '$'; + fSendBuffer[1] = channel; +- UInt16 netlen = htons(len); ++ UInt16 netlen = bswap_16(len); + memcpy(&fSendBuffer[2],&netlen,2); + memcpy(&fSendBuffer[4],data,len); + +@@ -1397,7 +1398,7 @@ + // The previous call to this function returned a packet successfully. We've been holding + // onto that packet data until now... Now we can blow it away. + UInt16* thePacketLenP = (UInt16*)fPacketBuffer; +- UInt16 thePacketLen = ntohs(thePacketLenP[1]); ++ UInt16 thePacketLen = bswap_16(thePacketLenP[1]); + + Assert(fPacketBuffer[0] == '$'); + +@@ -1442,7 +1443,7 @@ + { + Assert(fPacketBuffer[0] == '$'); + UInt16* thePacketLenP = (UInt16*)fPacketBuffer; +- UInt16 thePacketLen = ntohs(thePacketLenP[1]); ++ UInt16 thePacketLen = bswap_16(thePacketLenP[1]); + UInt8 channelIndex = fPacketBuffer[1]; + if (fPacketBufferOffset >= (thePacketLen + kPacketHeaderLen)) + { +@@ -1929,7 +1930,7 @@ + Socket::Initialize(); + SocketUtils::Initialize(); + +- UInt32 ipAddr = (UInt32)ntohl(::inet_addr("17.221.41.111")); ++ UInt32 ipAddr = (UInt32)bswap_32(::inet_addr("17.221.41.111")); + UInt16 port = 554; + StrPtrLen theURL("rtsp://17.221.41.111/mystery.mov"); + +diff -ur DarwinStreamingSrvr6.0.3-Source/Server.tproj/main.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/main.cpp +--- DarwinStreamingSrvr6.0.3-Source/Server.tproj/main.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/main.cpp 2008-05-30 23:01:50.000000000 +0200 +@@ -216,7 +216,7 @@ + //(void) ::signal(SIGPIPE, SIG_IGN); + struct sigaction act; + +-#if defined(sun) || defined(i386) || defined (__MacOSX__) || defined(__powerpc__) || defined (__osf__) || defined (__sgi_cc__) || defined (__hpux__) ++#if defined(sun) || defined(i386) || defined (__MacOSX__) || defined(__powerpc__) || defined (__osf__) || defined (__sgi_cc__) || defined (__hpux__) || defined(__linux__) + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = (void(*)(int))&sigcatcher; +diff -ur DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPPacketResender.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTPPacketResender.cpp +--- DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPPacketResender.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTPPacketResender.cpp 2008-05-30 23:47:41.000000000 +0200 +@@ -30,6 +30,7 @@ + + */ + ++#include + #include + + #include "RTPPacketResender.h" +@@ -315,7 +316,7 @@ + // we compute a re-transmit timeout based on the Karns RTT esmitate + + UInt16* theSeqNumP = (UInt16*)inRTPPacket; +- UInt16 theSeqNum = ntohs(theSeqNumP[1]); ++ UInt16 theSeqNum = bswap_16(theSeqNumP[1]); + + if ( ageLimit > 0 ) + { +@@ -348,7 +349,7 @@ + else + { + #if RTP_PACKET_RESENDER_DEBUGGING +- this->logprintf( "packet too old to add: seq# %li, age limit %li, cur late %li, track id %li\n", (SInt32)ntohs( *((UInt16*)(((char*)inRTPPacket)+2)) ), (SInt32)ageLimit, fCurrentPacketDelay, fTrackID ); ++ this->logprintf( "packet too old to add: seq# %li, age limit %li, cur late %li, track id %li\n", (SInt32)bswap_16( *((UInt16*)(((char*)inRTPPacket)+2)) ), (SInt32)ageLimit, fCurrentPacketDelay, fTrackID ); + #endif + fNumExpired++; + } +@@ -425,7 +426,7 @@ + { + #if RTP_PACKET_RESENDER_DEBUGGING + this->logprintf( "re-tx'd packet acked. ack num : %li, pack seq #: %li, num resends %li, track id %li, size %li, OS::MSecs %qd\n" \ +- , (SInt32)inSeqNum, (SInt32)ntohs( *((UInt16*)(((char*)theEntry->fPacketData)+2)) ), (SInt32)theEntry->fNumResends ++ , (SInt32)inSeqNum, (SInt32)bswap_16( *((UInt16*)(((char*)theEntry->fPacketData)+2)) ), (SInt32)theEntry->fNumResends + , (SInt32)fTrackID, theEntry->fPacketSize, OS::Milliseconds() ); + #endif + } +@@ -508,8 +509,8 @@ + version &= 0x84; // grab most sig 2 bits + version = version >> 6; // shift by 6 bits + this->logprintf( "expired: seq number %li, track id %li (port: %li), vers # %li, pack seq # %li, size: %li, OS::Msecs: %qd\n", \ +- (SInt32)ntohs( *((UInt16*)(((char*)theEntry->fPacketData)+2)) ), fTrackID, (SInt32) ntohs(fDestPort), \ +- (SInt32)version, (SInt32)ntohs( *((UInt16*)(((char*)theEntry->fPacketData)+2))), theEntry->fPacketSize, OS::Milliseconds() ); ++ (SInt32)bswap_16( *((UInt16*)(((char*)theEntry->fPacketData)+2)) ), fTrackID, (SInt32) bswap_16(fDestPort), \ ++ (SInt32)version, (SInt32)bswap_16( *((UInt16*)(((char*)theEntry->fPacketData)+2))), theEntry->fPacketSize, OS::Milliseconds() ); + #endif + // + // This packet is expired +@@ -527,8 +528,8 @@ + + theEntry->fNumResends++; + #if RTP_PACKET_RESENDER_DEBUGGING +- this->logprintf( "re-sent: %li RTO %li, track id %li (port %li), size: %li, OS::Ms %qd\n", (SInt32)ntohs( *((UInt16*)(((char*)theEntry->fPacketData)+2)) ), curTime - theEntry->fAddedTime, \ +- fTrackID, (SInt32) ntohs(fDestPort) \ ++ this->logprintf( "re-sent: %li RTO %li, track id %li (port %li), size: %li, OS::Ms %qd\n", (SInt32)bswap_16( *((UInt16*)(((char*)theEntry->fPacketData)+2)) ), curTime - theEntry->fAddedTime, \ ++ fTrackID, (SInt32) bswap_16(fDestPort) \ + , theEntry->fPacketSize, OS::Milliseconds()); + #endif + +diff -ur DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTPStream.cpp +--- DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTPStream.cpp 2008-05-30 23:47:51.000000000 +0200 +@@ -33,6 +33,7 @@ + + + ++#include + #include + #include + #include "SafeStdLib.h" +@@ -768,12 +769,12 @@ + struct sockaddr_in sin; + memset(&sin, 0, sizeof(struct sockaddr_in)); + sin.sin_family = AF_INET; +- sin.sin_addr.s_addr = htonl(fMonitorAddr); ++ sin.sin_addr.s_addr = bswap_32(fMonitorAddr); + + if (fPayloadType == qtssVideoPayloadType) +- sin.sin_port = (in_port_t) htons(fMonitorVideoDestPort+RTCPportOffset); ++ sin.sin_port = (in_port_t) bswap_16(fMonitorVideoDestPort+RTCPportOffset); + else if (fPayloadType == qtssAudioPayloadType) +- sin.sin_port = (in_port_t) htons(fMonitorAudioDestPort+RTCPportOffset); ++ sin.sin_port = (in_port_t) bswap_16(fMonitorAudioDestPort+RTCPportOffset); + + if (sin.sin_port != 0) + { +@@ -782,7 +783,7 @@ + { if (result < 0) + qtss_printf("RTCP Monitor Socket sendto failed\n"); + else if (0) +- qtss_printf("RTCP Monitor Socket sendto port=%hu, packetLen=%"_U32BITARG_"\n", ntohs(sin.sin_port), inLen); ++ qtss_printf("RTCP Monitor Socket sendto port=%hu, packetLen=%"_U32BITARG_"\n", bswap_16(sin.sin_port), inLen); + } + } + +@@ -1211,7 +1212,7 @@ + this->PrintPacketPrefEnabled( (char*) thePacket->packetData, inLen, (SInt32) RTPStream::rtp); + + UInt16* theSeqNumP = (UInt16*)thePacket->packetData; +- UInt16 theSeqNum = ntohs(theSeqNumP[1]); ++ UInt16 theSeqNum = bswap_16(theSeqNumP[1]); + + //Add the packet sequence number and the timestamp to the list of mappings if doing 3GPP-rate-adaptation. + fStream3GPP->AddSeqNumTimeMapping(theSeqNum, thePacket->packetTransmitTime); +@@ -1263,7 +1264,7 @@ + if (err != QTSS_NoErr) + fResender.logprintf("Flow controlled: %qd Overbuffer window: %d. Cur time %qd\n", theCurrentPacketDelay, fSession->GetOverbufferWindow()->AvailableSpaceInWindow(), theTime); + else +- fResender.logprintf("Sent packet: %d. Overbuffer window: %d Transmit time %qd. Cur time %qd\n", ntohs(theSeqNum[1]), fSession->GetOverbufferWindow()->AvailableSpaceInWindow(), thePacket->packetTransmitTime, theTime); ++ fResender.logprintf("Sent packet: %d. Overbuffer window: %d Transmit time %qd. Cur time %qd\n", bswap_16(theSeqNum[1]), fSession->GetOverbufferWindow()->AvailableSpaceInWindow(), thePacket->packetTransmitTime, theTime); + #endif + //if (err != QTSS_NoErr) + // qtss_printf("flow controlled\n"); +@@ -1283,7 +1284,7 @@ + + // Record the RTP timestamp for RTCPs + UInt32* timeStampP = (UInt32*)(thePacket->packetData); +- fLastRTPTimestamp = ntohl(timeStampP[1]); ++ fLastRTPTimestamp = bswap_32(timeStampP[1]); + + //stream statistics + fPacketCount++; +@@ -1786,9 +1787,9 @@ + void RTPStream::PrintRTP(char* packetBuff, UInt32 inLen) + { + +- UInt16 sequence = ntohs( ((UInt16*)packetBuff)[1]); +- UInt32 timestamp = ntohl( ((UInt32*)packetBuff)[1]); +- UInt32 ssrc = ntohl( ((UInt32*)packetBuff)[2]); ++ UInt16 sequence = bswap_16( ((UInt16*)packetBuff)[1]); ++ UInt32 timestamp = bswap_32( ((UInt32*)packetBuff)[1]); ++ UInt32 ssrc = bswap_32( ((UInt32*)packetBuff)[2]); + + + +@@ -1819,7 +1820,7 @@ + UInt32* theReport = (UInt32*)packetBuff; + + theReport++; +- UInt32 ssrc = htonl(*theReport); ++ UInt32 ssrc = bswap_32(*theReport); + + theReport++; + SInt64 ntp = 0; +@@ -1828,7 +1829,7 @@ + time_t theTime = OS::Time1900Fixed64Secs_To_UnixTimeSecs(ntp); + + theReport += 2; +- UInt32 timestamp = ntohl(*theReport); ++ UInt32 timestamp = bswap_32(*theReport); + Float32 theTimeInSecs = 0.0; + + if (fFirstTimeStamp == 0) +@@ -1838,10 +1839,10 @@ + theTimeInSecs = (Float32) (timestamp - fFirstTimeStamp) / (Float32) fTimescale; + + theReport++; +- UInt32 packetcount = ntohl(*theReport); ++ UInt32 packetcount = bswap_32(*theReport); + + theReport++; +- UInt32 bytecount = ntohl(*theReport); ++ UInt32 bytecount = bswap_32(*theReport); + + StrPtrLen *payloadStr = this->GetValue(qtssRTPStrPayloadName); + if (payloadStr && payloadStr->Len > 0) +diff -ur DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequestInterface.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTSPRequestInterface.cpp +--- DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequestInterface.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTSPRequestInterface.cpp 2008-05-30 23:48:14.000000000 +0200 +@@ -35,6 +35,7 @@ + + //INCLUDES: + #ifndef __Win32__ ++#include + #include + #include + #endif +@@ -443,7 +444,7 @@ + + UInt32 ssrcVal = 0; + ::sscanf(theCString, "%"_U32BITARG_"", &ssrcVal); +- ssrcVal = htonl(ssrcVal); ++ ssrcVal = bswap_32(ssrcVal); + + StrPtrLen hexSSRC(QTSSDataConverter::ValueToString( &ssrcVal, sizeof(ssrcVal), qtssAttrDataTypeUnknown)); + OSCharArrayDeleter hexStrDeleter(hexSSRC.Ptr); +diff -ur DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequestStream.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTSPRequestStream.cpp +--- DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequestStream.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTSPRequestStream.cpp 2008-05-30 23:48:21.000000000 +0200 +@@ -32,6 +32,7 @@ + */ + + ++#include + #include "RTSPRequestStream.h" + #include "StringParser.h" + #include "OSMemory.h" +@@ -163,7 +164,7 @@ + if (fRequest.Len < 4) + continue; + UInt16* dataLenP = (UInt16*)fRequest.Ptr; +- UInt32 interleavedPacketLen = ntohs(dataLenP[1]) + 4; ++ UInt32 interleavedPacketLen = bswap_16(dataLenP[1]) + 4; + if (interleavedPacketLen > fRequest.Len) + continue; + +diff -ur DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPSession.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTSPSession.cpp +--- DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPSession.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTSPSession.cpp 2008-05-31 00:03:01.000000000 +0200 +@@ -34,6 +34,7 @@ + #define __RTSP_AUTH_DEBUG__ 0 + #define debug_printf if (__RTSP_AUTH_DEBUG__) qtss_printf + ++#include + #include "RTSPSession.h" + #include "RTSPRequest.h" + #include "QTSServerInterface.h" +@@ -1556,7 +1557,7 @@ + QTSSDataConverter::ConvertCHexStringToBytes(tempString.Ptr, + &ncValue, + &bufSize); +- ncValue = ntohl(ncValue); ++ ncValue = bswap_32(ncValue); + + } + // nonce count must not be repeated by the client +diff -ur DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPSessionInterface.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTSPSessionInterface.cpp +--- DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPSessionInterface.cpp 2008-05-06 01:28:59.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/Server.tproj/RTSPSessionInterface.cpp 2008-05-30 23:48:28.000000000 +0200 +@@ -31,6 +31,7 @@ + + */ + ++#include + #include "atomic.h" + + #include "RTSPSessionInterface.h" +@@ -332,7 +333,7 @@ + // write direct to stream + rih.header = '$'; + rih.channel = channel; +- rih.len = htons( (UInt16)inLen); ++ rih.len = bswap_16( (UInt16)inLen); + + iov[1].iov_base = (char*)&rih; + iov[1].iov_len = sizeof(rih); +@@ -357,11 +358,11 @@ + fTCPCoalesceBuffer[fNumInCoalesceBuffer] = channel; + fNumInCoalesceBuffer++; + +- //*((short*)&fTCPCoalesceBuffer[fNumInCoalesceBuffer]) = htons(inLen); ++ //*((short*)&fTCPCoalesceBuffer[fNumInCoalesceBuffer]) = bswap_16(inLen); + // if we ever turn TCPCoalesce back on, this should be optimized + // for processors w/o alignment restrictions as above. + +- SInt16 pcketLen = htons( (UInt16) inLen); ++ SInt16 pcketLen = bswap_16( (UInt16) inLen); + ::memcpy( &fTCPCoalesceBuffer[fNumInCoalesceBuffer], &pcketLen, 2 ); + fNumInCoalesceBuffer += 2; + +diff -ur DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingLoadTool/Makefile.POSIX +--- DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX 2008-05-24 02:32:03.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingLoadTool/Makefile.POSIX 2008-05-31 11:16:47.000000000 +0200 +@@ -61,6 +61,7 @@ + + clean: + rm -f $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) ++ rm -f StreamingLoadTool + + .SUFFIXES: .cpp .c .o + +diff -ur DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingLoadTool/StreamingLoadTool.cpp +--- DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp 2008-05-24 02:22:13.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingLoadTool/StreamingLoadTool.cpp 2008-05-30 23:59:56.000000000 +0200 +@@ -28,6 +28,7 @@ + Contains: Tool that simulates streaming movie load + */ + ++#include + #include + #include + #include +@@ -135,7 +136,7 @@ + #ifndef __Win32__ + struct sigaction act; + +-#if defined(sun) || defined(i386) || defined (__MacOSX__) || defined(__powerpc__) || defined (__osf__) || defined (__sgi_cc__) || defined (__hpux__) ++#if defined(sun) || defined(i386) || defined (__MacOSX__) || defined(__powerpc__) || defined (__osf__) || defined (__sgi_cc__) || defined (__hpux__) || defined (__linux__) + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = (void(*)(int))&sigcatcher; +@@ -913,7 +914,7 @@ + char theAddrBuf[50]; + StrPtrLen theAddrBufPtr(theAddrBuf, 50); + struct in_addr theAddr; +- theAddr.s_addr = htonl(ioIPAddrArray[count]); ++ theAddr.s_addr = bswap_32(ioIPAddrArray[count]); + + SocketUtils::ConvertAddrToString(theAddr, &theAddrBufPtr); + +@@ -1015,7 +1016,7 @@ + struct hostent* theHostent = ::gethostbyname(theDNSName); + + if (theHostent != NULL) +- ioIPAddrs[x] = ntohl(*(UInt32*)(theHostent->h_addr_list[0])); ++ ioIPAddrs[x] = bswap_32(*(UInt32*)(theHostent->h_addr_list[0])); + else + ioIPAddrs[x] = SocketUtils::ConvertStringToAddr(theDNSName); + +@@ -1117,7 +1118,7 @@ + { + UInt32 theReason = inSession->GetReasonForDying(); + in_addr theAddr; +- theAddr.s_addr = htonl(inSession->GetSocket()->GetHostAddr()); ++ theAddr.s_addr = bswap_32(inSession->GetSocket()->GetHostAddr()); + char* theAddrStr = ::inet_ntoa(theAddr); + + // +diff -ur DarwinStreamingSrvr6.0.3-Source/StreamingProxy.tproj/Makefile.POSIX DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingProxy.tproj/Makefile.POSIX +--- DarwinStreamingSrvr6.0.3-Source/StreamingProxy.tproj/Makefile.POSIX 2007-11-16 06:16:39.000000000 +0100 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingProxy.tproj/Makefile.POSIX 2008-05-31 11:02:10.000000000 +0200 +@@ -15,6 +15,7 @@ + + CCFLAGS += -I. + CCFLAGS += -I.. ++CCFLAGS += -I../CommonUtilitiesLib + + C++FLAGS = $(CCFLAGS) + +diff -ur DarwinStreamingSrvr6.0.3-Source/StreamingProxy.tproj/proxy.c DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingProxy.tproj/proxy.c +--- DarwinStreamingSrvr6.0.3-Source/StreamingProxy.tproj/proxy.c 2008-05-06 01:28:57.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingProxy.tproj/proxy.c 2008-05-31 11:02:38.000000000 +0200 +@@ -29,6 +29,7 @@ + * + */ + ++#include + #include + #include + #include +@@ -56,6 +57,7 @@ + #include "./proxy_plat.h" + #include "util.h" + #include "proxy.h" ++#include "OSHeaders.h" + + #include + +@@ -862,7 +864,7 @@ + } + *cmd = '\0'; + if (gVerbose) +- printf("%x\ncommand str=%s\ncommand count with term=%d\n",*cmd, firstCmdChar, (cmd - firstCmdChar) + 1); ++ printf("%x\ncommand str=%s\ncommand count with term=%"_SPOINTERSIZEARG_"\n",*cmd, firstCmdChar, (cmd - firstCmdChar) + 1); + + if (strn_casecmp(p, " rtsp://", 8) != 0) + return 0; +@@ -877,7 +879,7 @@ + } + *server = '\0'; + if (gVerbose) +- printf("%x\nserver str=%s\nserver count with term=%d\n",*server, firstServerChar, (server - firstServerChar) + 1); ++ printf("%x\nserver str=%s\nserver count with term=%"_SPOINTERSIZEARG_"\n",*server, firstServerChar, (server - firstServerChar) + 1); + + return 1; + } +@@ -1821,7 +1823,7 @@ + temp[num] = '\0'; + range = atoi(line + pmatch[2].rm_so); + //name_to_ip_num(temp, &ip, false); +- ip = ntohl(inet_addr(temp)); ++ ip = bswap_32(inet_addr(temp)); + if (gVerbose) + printf("Allow connections from %s/%d\n", ip_to_string(ip), range); + add_allow_subnet(ip, range); +@@ -1836,7 +1838,7 @@ + int port = atoi(line + pmatch[2].rm_so); + + if(pmatch[1].rm_so==-1) +- bindaddr.s_addr= (in_addr_t) htonl(ANY_ADDRESS); ++ bindaddr.s_addr= (in_addr_t) bswap_32(ANY_ADDRESS); + else + { + *(line+pmatch[1].rm_eo)='\0'; +@@ -1849,7 +1851,7 @@ + printf("listen: failed to parse IP address %s\n",line+pmatch[1].rm_so); + } + +- add_rtsp_port_listener( (int) ntohl(bindaddr.s_addr),port); ++ add_rtsp_port_listener( (int) bswap_32(bindaddr.s_addr),port); + } + else if (regexec(®expPortRange, line, 3, pmatch, 0) == 0) { + int minPort, maxPort; +diff -ur DarwinStreamingSrvr6.0.3-Source/StreamingProxy.tproj/proxy_unix.c DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingProxy.tproj/proxy_unix.c +--- DarwinStreamingSrvr6.0.3-Source/StreamingProxy.tproj/proxy_unix.c 2008-05-06 01:28:57.000000000 +0200 ++++ DarwinStreamingSrvr6.0.3-Source.x86_64/StreamingProxy.tproj/proxy_unix.c 2008-05-30 23:49:17.000000000 +0200 +@@ -29,6 +29,7 @@ + */ + + ++#include + #include + #include + #include +@@ -113,7 +114,7 @@ + *pb->result = -1; + pthread_exit(NULL); + } while(0); +- id = ntohl(((struct in_addr *)(hent->h_addr_list[0]))->s_addr); ++ id = bswap_32(((struct in_addr *)(hent->h_addr_list[0]))->s_addr); + *pb->result = id; + free(pb); + pthread_exit(NULL); +@@ -155,7 +156,7 @@ + + tryAgain ++; + if ( inet_aton( name, &addr ) ) +- { *ip = ntohl( addr.s_addr ); ++ { *ip = bswap_32( addr.s_addr ); + add_to_IP_cache(name, *ip ); + return 0; + } +@@ -168,7 +169,7 @@ + add_to_IP_cache(name, -1); + return -1; + } +- *ip = ntohl(((struct in_addr *) (hent->h_addr_list[0]))->s_addr); ++ *ip = bswap_32(((struct in_addr *) (hent->h_addr_list[0]))->s_addr); + add_to_IP_cache(name, *ip); + return 0; + } +@@ -188,8 +189,8 @@ + if (status >= 0) + { + if (port) +- *port = ntohs(remAddr.sin_port); +- return ntohl(remAddr.sin_addr.s_addr); ++ *port = bswap_16(remAddr.sin_port); ++ return bswap_32(remAddr.sin_addr.s_addr); + } + return -1; + } +@@ -207,8 +208,8 @@ + if (status >= 0) + { + if (port) +- *port = ntohs(remAddr.sin_port); +- return ntohl(remAddr.sin_addr.s_addr); ++ *port = bswap_16(remAddr.sin_port); ++ return bswap_32(remAddr.sin_addr.s_addr); + } + return -1; + } +@@ -243,7 +244,7 @@ + } + return -1; + } +- __local_ip_address = ntohl(((struct in_addr *)hent->h_addr)->s_addr); ++ __local_ip_address = bswap_32(((struct in_addr *)hent->h_addr)->s_addr); + return __local_ip_address; + } + +@@ -397,8 +398,8 @@ + + memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; +- sin.sin_port = htons(port); +- sin.sin_addr.s_addr = htonl(address); ++ sin.sin_port = bswap_16(port); ++ sin.sin_addr.s_addr = bswap_32(address); + return bind(skt, (struct sockaddr*)&sin, sizeof(sin)); + } + +@@ -454,8 +455,8 @@ + + memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; +- sin.sin_port = htons(port); +- sin.sin_addr.s_addr = htonl(address);; ++ sin.sin_port = bswap_16(port); ++ sin.sin_addr.s_addr = bswap_32(address);; + return connect(skt, (struct sockaddr*)&sin, sizeof(sin)); + } + +@@ -467,7 +468,7 @@ + memset(&localAddr, 0, sizeof(localAddr)); + + err = getsockname(skt, (struct sockaddr*)&localAddr, &len); +- return ntohl(localAddr.sin_addr.s_addr); ++ return bswap_32(localAddr.sin_addr.s_addr); + } + + /**********************************************/ +@@ -482,9 +483,9 @@ + ret = recvfrom(socket, buf, (size_t) amt, 0, (struct sockaddr*)&sin, &len); + if (ret != -1) { + if (fromip) +- *fromip = ntohl(sin.sin_addr.s_addr); ++ *fromip = bswap_32(sin.sin_addr.s_addr); + if (fromport) +- *fromport = ntohs(sin.sin_port); ++ *fromport = bswap_16(sin.sin_port); + } + return ret; + } +@@ -496,8 +497,8 @@ + + memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; +- sin.sin_port = htons(port); +- sin.sin_addr.s_addr = htonl(address); ++ sin.sin_port = bswap_16(port); ++ sin.sin_addr.s_addr = bswap_32(address); + return sendto(skt, buf, (size_t) amt, 0, (struct sockaddr*)&sin, sizeof(sin)); + } + diff --git a/media-video/darwin-streaming-server/files/dss.rc b/media-video/darwin-streaming-server/files/dss.rc new file mode 100644 index 0000000..4d670fd --- /dev/null +++ b/media-video/darwin-streaming-server/files/dss.rc @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later + +depend() { + need net + use dns +} + +start() { + ebegin "Starting Darwin Streaming Server" + start-stop-daemon --quiet --start --exec /usr/sbin/DarwinStreamingServer + eend $? +} + +stop() { + ebegin "Stopping Darwin Streaming Server" + killall -s KILL DarwinStreamingServer + rm -f /var/run/DarwinStreamingServer.pid + eend $? +} + +status() { + kill -0 `ps -Aww -o pid,cmd | grep --color=never "^[^r].*[D]arwinStreamingServer" | awk '{ print $1 }'` > /dev/null 2>&1 + eend $? +} From 1c873fc99818d358aa39200796b5c38936aa602a Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Tue, 14 Mar 2017 19:21:49 -0600 Subject: [PATCH 2/9] ebuild from portage --- dev-libs/libressl/libressl-2.5.1.ebuild | 52 +++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 dev-libs/libressl/libressl-2.5.1.ebuild diff --git a/dev-libs/libressl/libressl-2.5.1.ebuild b/dev-libs/libressl/libressl-2.5.1.ebuild new file mode 100644 index 0000000..320352a --- /dev/null +++ b/dev-libs/libressl/libressl-2.5.1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils multilib-minimal + +DESCRIPTION="Free version of the SSL/TLS protocol forked from OpenSSL" +HOMEPAGE="http://www.libressl.org/" +SRC_URI="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${P}.tar.gz" + +LICENSE="ISC openssl" +# Reflects ABI of libcrypto.so and libssl.so. Since these can differ, +# we'll try to use the max of either. However, if either change between +# versions, we have to change the subslot to trigger rebuild of consumers. +SLOT="0/43" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86" +IUSE="+asm static-libs" + +RDEPEND="!dev-libs/openssl:0" +DEPEND="${RDEPEND}" +PDEPEND="app-misc/ca-certificates" + +src_prepare() { + touch crypto/Makefile.in + + sed -i \ + -e '/^[ \t]*CFLAGS=/s#-g ##' \ + -e '/^[ \t]*CFLAGS=/s#-g"#"#' \ + -e '/^[ \t]*CFLAGS=/s#-O2 ##' \ + -e '/^[ \t]*CFLAGS=/s#-O2"#"#' \ + -e '/^[ \t]*USER_CFLAGS=/s#-O2 ##' \ + -e '/^[ \t]*USER_CFLAGS=/s#-O2"#"#' \ + configure || die "fixing CFLAGS failed" + + eapply_user +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf \ + $(use_enable asm) \ + $(use_enable static-libs static) +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files +} From 72c63fa62143bfaf778135da0bfdf891fe3fa3f6 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Tue, 14 Mar 2017 19:24:21 -0600 Subject: [PATCH 3/9] ebuild parchado sin conflicto con openssl --- dev-libs/libressl/Manifest | 2 ++ .../{libressl-2.5.1.ebuild => libressl-2.5.1-r100.ebuild} | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) rename dev-libs/libressl/{libressl-2.5.1.ebuild => libressl-2.5.1-r100.ebuild} (96%) diff --git a/dev-libs/libressl/Manifest b/dev-libs/libressl/Manifest index 4c6e648..bee68c4 100644 --- a/dev-libs/libressl/Manifest +++ b/dev-libs/libressl/Manifest @@ -2,6 +2,8 @@ AUX libressl-2.2.4-clientcert.patch 1387 SHA256 a9a4038c02e6c21fb927141695da600f DIST libressl-2.2.5.tar.gz 2966527 SHA256 e3caded0469d8dc64f4ca2fe8e499ada4dd014e84d1c5a71818d39e54e6c914b SHA512 501d04cb966260854082d374e60aabde21bcd65a331ff7c76044f2053b22ddab4914710b223b400a3a181873c6af5e2e7da5f04bdd9028fddbf420e259a2863a WHIRLPOOL 47f7d35ceff5004af0c2f79509678c4826eabe05225dbcf5cbe1f9cb358d1657ff288a702e14bfd578fd03e38256d2aa2c79ec724a05c98aa91317e6a9a5f9d4 DIST libressl-2.2.6.tar.gz 2965531 SHA256 1ee19994cffd047d40f63ba149115dba18a681b0cc923beec301bf424b58d64f SHA512 41e29431ad9e8b18e2dbc30fe9df1d7be3ca372d5d7757b5b01f8904515bafd5333446957fbc9874f64f384dae56cf6bf29d6808a7c0df1836b55ea64804a4bf WHIRLPOOL 49b6efa211ea4789e51388d3ebfec941dfedad427b806b33d439a7639e09d16e5c9004edc4a4c8e3de63040ebc2fe0a3a3819c68ed674e3bb36bb52b49e75ce5 DIST libressl-2.5.0.tar.gz 3012855 SHA256 8652bf6b55ab51fb37b686a3f604a2643e0e8fde2c56e6a936027d12afda6eae SHA512 6372b27f1696e957389646a05b0572ad6936443b34fee0e57153b063831e00318fa1b434e3e0369f0c3df872e15ad3bee2f85db0851021444612f2a6f266a332 WHIRLPOOL 9b145915734a1914f0d36df04a8b35aa2ce2c91f7d6b3a978c5c6845314c56c61718fce6c471ba1a03f3d1ff052246c3db767adee99bc3d38a6bd692b9086ad0 +DIST libressl-2.5.1.tar.gz 3266271 SHA256 f71ae0a824b78fb1a47ffa23c9c26e9d96c5c9b29234eacedce6b4c7740287cd SHA512 44557c7c3e6bc9c0af9ae83b26765be9707d53708a32a5a945108a49ea20503afa4197919801830d27821c069b87e0e0edd284bd1b8a85340dbc0da2c162c2f9 WHIRLPOOL e31b487e9e88f372cd22db05e54e74900181120cf8c6105f5531658e7b467722680921f3630b8943ee0ec5f5777cb76a7ddc64e4d43f166903928aaa4f98509c EBUILD libressl-2.2.5.ebuild 1054 SHA256 142e8949dd994b073f5534eec5179e0279b0355db8d19706ae79fec884fd8e50 SHA512 857a5a4f515b0d3da119afbe887904f22d4dc4604c6a79356babe7153780fd1891f8a2669a60fc6a21306b87489f49da5b9b025c9b7bfd7c77769f375c02999a WHIRLPOOL 045e3fc06a6756d388ac812275e7d356882ef060dca81ec842b843015169e16d21321135e3b16e56ffe61964d625fb3df279013dbecb865a8d3c54d8b47fc723 EBUILD libressl-2.2.6.ebuild 1054 SHA256 3fab9e63f6de19c5b8f72004eb07683bf4f6258ca6ba4e894d8bfdd7bda4ca7d SHA512 5c0b1cc0cec3b2377ecaef9656abdff5423d4ec3382c40efd1755af7aa381c9ff776d163d66bbd02e0f5aae7d77817d9bbb5add36b3d7bc79f1f8ab8fa8760f5 WHIRLPOOL ff305eb21f44a422b921164114d115b8f8942b79b78316181423a2bee71ac9f93a8308c777722f1fe0af0661649dfa7b8d3e357f98073a80783a64a3a97f5ccf EBUILD libressl-2.5.0-r1.ebuild 1229 SHA256 3012d42d7b9f4294825c234106177dfa5c8e323b9e95adcae870d37d6cfd6a7a SHA512 7f52efcd5891c2b758b595ba3985114bc3ee994de190a1a8fbf6cf2022c4cc45f4b40a3ef0e5b23ca16c17b47600b23e146348016b0c1a8f6b8b4733feb5614a WHIRLPOOL f6ddc4a0cef44805b5fbf7d90d338b9a7f622297edc7bb522ed46b521234799fd1b64390cd937ef0a87259f5d91d6190172a8b5eb809373895d4bc73dcb52909 +EBUILD libressl-2.5.1-r100.ebuild 1243 SHA256 f866bdbf7e3d93c54be85ff3aa34daa53e9aeacf0603d7a3097fe9b85f3c98cb SHA512 8c589126549842d807aeed4800f036097011556ef6615d02b3703f0335247322c52f7115b1d1efde900e291f4df4fe4beabf396b4d45b7841c34911aacc9f8e4 WHIRLPOOL ad33df3b7360c9d149af41c5377709e7f2d2de6994d839c1ee0ab708477ee4433fce3c0bec479e91a3f1fed3d194bd28b0df3f7dd5d3cea383828a21a997088a diff --git a/dev-libs/libressl/libressl-2.5.1.ebuild b/dev-libs/libressl/libressl-2.5.1-r100.ebuild similarity index 96% rename from dev-libs/libressl/libressl-2.5.1.ebuild rename to dev-libs/libressl/libressl-2.5.1-r100.ebuild index 320352a..b8f44ca 100644 --- a/dev-libs/libressl/libressl-2.5.1.ebuild +++ b/dev-libs/libressl/libressl-2.5.1-r100.ebuild @@ -17,8 +17,6 @@ SLOT="0/43" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86" IUSE="+asm static-libs" -RDEPEND="!dev-libs/openssl:0" -DEPEND="${RDEPEND}" PDEPEND="app-misc/ca-certificates" src_prepare() { From 18ecc337b0b3fa97ce1441c8a0370ae3ec517945 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Tue, 28 Mar 2017 15:55:12 -0600 Subject: [PATCH 4/9] ebuild de OpenSSL menor al 9999 de Portage --- dev-libs/openssl/Manifest | 2 +- dev-libs/openssl/{openssl-9999.ebuild => openssl-9998.ebuild} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename dev-libs/openssl/{openssl-9999.ebuild => openssl-9998.ebuild} (100%) diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest index 0f247f5..3107461 100644 --- a/dev-libs/openssl/Manifest +++ b/dev-libs/openssl/Manifest @@ -1 +1 @@ -EBUILD openssl-9999.ebuild 473 SHA256 bfce34844c7d951322001415b8dd05faa8d6639e47478c0dba049ac67bb75fc6 SHA512 1e21f1b3a1faf0eb1cff2be2fc2eb7860ae9dc1b6aebdca35d6c6f42fafa458a7c62df6a7794069f1ad6fd1520f4f5ae3e862f661ce453132ee2b75c6c847356 WHIRLPOOL 9d0caf920de1db71a2aaa3785228c60b0b2aa7ded4df31e4215b26e051fe239b103ede7b15c1024d2f1722aa8bf98a3643e5b93a2d3d5bb38273cddcf0527453 +EBUILD openssl-9998.ebuild 473 SHA256 bfce34844c7d951322001415b8dd05faa8d6639e47478c0dba049ac67bb75fc6 SHA512 1e21f1b3a1faf0eb1cff2be2fc2eb7860ae9dc1b6aebdca35d6c6f42fafa458a7c62df6a7794069f1ad6fd1520f4f5ae3e862f661ce453132ee2b75c6c847356 WHIRLPOOL 9d0caf920de1db71a2aaa3785228c60b0b2aa7ded4df31e4215b26e051fe239b103ede7b15c1024d2f1722aa8bf98a3643e5b93a2d3d5bb38273cddcf0527453 diff --git a/dev-libs/openssl/openssl-9999.ebuild b/dev-libs/openssl/openssl-9998.ebuild similarity index 100% rename from dev-libs/openssl/openssl-9999.ebuild rename to dev-libs/openssl/openssl-9998.ebuild From a58089804b706075e5bd75296e28e6ea849354e4 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Tue, 28 Mar 2017 15:58:30 -0600 Subject: [PATCH 5/9] limpieza de versiones viejas de portage --- sys-apps/portage/Manifest | 14 - sys-apps/portage/portage-2.1.8.3.ebuild | 305 --------------------- sys-apps/portage/portage-2.1.9.24.ebuild | 312 --------------------- sys-apps/portage/portage-2.1.9.25.ebuild | 313 --------------------- sys-apps/portage/portage-2.1.9.26.ebuild | 313 --------------------- sys-apps/portage/portage-2.1.9.27.ebuild | 313 --------------------- sys-apps/portage/portage-2.1.9.42.ebuild | 329 ----------------------- 7 files changed, 1899 deletions(-) delete mode 100644 sys-apps/portage/Manifest delete mode 100644 sys-apps/portage/portage-2.1.8.3.ebuild delete mode 100644 sys-apps/portage/portage-2.1.9.24.ebuild delete mode 100644 sys-apps/portage/portage-2.1.9.25.ebuild delete mode 100644 sys-apps/portage/portage-2.1.9.26.ebuild delete mode 100644 sys-apps/portage/portage-2.1.9.27.ebuild delete mode 100644 sys-apps/portage/portage-2.1.9.42.ebuild diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest deleted file mode 100644 index da66450..0000000 --- a/sys-apps/portage/Manifest +++ /dev/null @@ -1,14 +0,0 @@ -DIST portage-2.1.8.3.patch.bz2 11222 RMD160 43f99de135eccd78731dfa6105edca68497b6f38 SHA1 52ce6297abcbc82913eb179209b210b9334e1351 SHA256 8e0e1efbcf6a2d62125316970052987154656f3fda892c20b99b2270e2e8943f -DIST portage-2.1.8.tar.bz2 522621 RMD160 12a079f48552b78162a857b732ab8bfe76bd7b6e SHA1 390c97f3783af2d9e52482747ead3681655ea9c3 SHA256 9440bea218a059fc52c5639945c91c8ad6fdcd8d1d4a9dc7672d0da783345303 -DIST portage-2.1.9.24.tar.bz2 728502 RMD160 da48b121036c5e6821bd50be468fdf4e01d77a6a SHA1 ebfc559b9fddca57fa2bfb8e179f7f0f660d7e07 SHA256 744375b5239833fe4e57b4ff07003947fa94ac5b2cfe8108e1dd0919642635d2 -DIST portage-2.1.9.25.tar.bz2 736245 RMD160 96b8dc89ea2bcbe2932161e0604d31d97fe877af SHA1 d445211758bead0835e275b4e3534fb635dff38b SHA256 2d19a9bda3228852bf628cf5d4fe361eae2f531e729bd9a41b76fd57bf079ef5 -DIST portage-2.1.9.26.tar.bz2 741643 RMD160 834c07be0b5ecdfcb3b13531f20c7c9f37602642 SHA1 107dd880b9e98493632f8ec97d7ee51a7ca0a0fe SHA256 6f179ae91f149e38431869e0541b8617e2c54236fcc26858f720996aebf45e3f -DIST portage-2.1.9.27.tar.bz2 744372 RMD160 3ca1a36e6c7e1dff516f4f29c3d088f2ab765b9c SHA1 d911d9e0309523d7302aaa4600efb153c1c2c863 SHA256 bb0fc7a566869673de5507d2735b7d1abe381b83d8650fee7d3a4893a5cc2c69 -DIST portage-2.1.9.42.tar.bz2 764537 RMD160 7bfef7fb167c986e36532416a0ed4b914f0a9809 SHA1 d5593b09781dae537198197adc3c1d7f7fb466f7 SHA256 1bd238065eca36aaae11607482ae43b20c64f338db7401a46c11ab56d6ff72ba -DIST portage-man-pl-2.1.2.tar.bz2 53893 RMD160 46c3656b40bf4ad2530ab2b5fbc563708b86748c SHA1 c3151e0b330c589625830e54053fbc676b2c64de SHA256 960eaa7c6f3a2af44bdc665266a8e884628a562373cc477d301597ecc5ef961f -EBUILD portage-2.1.8.3.ebuild 9294 RMD160 5c55fad71bbdee32c98ca4e3ebeef9803de4ae99 SHA1 9125c7cc061872af38063e0aa8ff6bd1a5f6849e SHA256 6d134c9ce1e0c9ce12fc289db3bc92704ac3acacb637a0b8188ef6600f289eb4 -EBUILD portage-2.1.9.24.ebuild 9617 RMD160 0ff09ba6159cf9a04ff0075134ed3b427a54b027 SHA1 1b40d2059e4e8417af456b3da698f5634e5fb5fc SHA256 c59e6ee9e7d76c545b6ab29c08568a1906edabf82604b5ed832ec838747a97a3 -EBUILD portage-2.1.9.25.ebuild 9663 RMD160 d29d2d3ce8ce758a32603ae97c56f200c500e6d5 SHA1 abda8537490864d08363dff85be9fc96326dadc0 SHA256 8058c66d7c43b6602fb6bfce92011447a7b365393df2e466f9e2420e58857c61 -EBUILD portage-2.1.9.26.ebuild 9670 RMD160 14e273d4ff554ca2b148be90cdc104a560b74309 SHA1 292773ef052082327a2e66d5f5921f13c86c1bf1 SHA256 6917513b862e3df48d556c5d83c390fb6ca7ed45b0c655392f9079cea08a0424 -EBUILD portage-2.1.9.27.ebuild 9670 RMD160 016d0a8270733a1f343831fb011bf0852dfca326 SHA1 1396515663d6b6c015db7930cc4c645db7753f06 SHA256 38d9e82a0f27fa33ff91c864ad077d4653091c6b7a862dacca908a8f15acea79 -EBUILD portage-2.1.9.42.ebuild 10289 RMD160 eabbb2280aedc80deb54be906c449d830d9adb22 SHA1 418b18ff97cd744a8ab464a210ef991111ea4f11 SHA256 dc16992343d58892741adf6cf64a220a000298c1474976a8e33b63a3be337915 diff --git a/sys-apps/portage/portage-2.1.8.3.ebuild b/sys-apps/portage/portage-2.1.8.3.ebuild deleted file mode 100644 index 46bf6da..0000000 --- a/sys-apps/portage/portage-2.1.8.3.ebuild +++ /dev/null @@ -1,305 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/Attic/portage-2.1.8.3.ebuild,v 1.10 2010/10/13 01:30:40 zmedico Exp $ - -# Require EAPI 2 since we now require at least python-2.6 (for python 3 -# syntax support) which also requires EAPI 2. -EAPI=2 -inherit eutils multilib python - -DESCRIPTION="Portage is the package management and distribution system for Gentoo" -HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" -LICENSE="GPL-2" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" -PROVIDE="virtual/portage" -SLOT="0" -IUSE="build doc epydoc linguas_pl python3 selinux" - -python_dep="python3? ( dev-lang/python:3.1 ) - !python3? ( - build? ( = 0x2060000 and "good" or "bad")') = good ]] -} - -pkg_setup() { - if ! use python3 && ! compatible_python_is_selected ; then - ewarn "Attempting to select a compatible default python interpreter" - local x success=0 - for x in /usr/bin/python2.* ; do - x=${x#/usr/bin/python2.} - if [[ $x -ge 6 ]] 2>/dev/null ; then - eselect python set python2.$x - if compatible_python_is_selected ; then - elog "Default python interpreter is now set to python-2.$x" - success=1 - break - fi - fi - done - if [ $success != 1 ] ; then - eerror "Unable to select a compatible default python interpreter!" - die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." - fi - fi - - if use python3; then - python_set_active_version 3 - fi -} - -src_prepare() { - if [ -n "${PATCHVER}" ] ; then - if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then - rm "$S/bin/ebuild-helpers/portageq" \ - || die "failed to remove portageq helper symlink" - fi - epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" - fi - einfo "Setting portage.VERSION to ${PVR} ..." - sed -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage/__init__.py || \ - die "Failed to patch portage.VERSION" - - if use python3; then - python_convert_shebangs -r 3 . - fi -} - -src_compile() { - if use doc; then - cd "${S}"/doc - touch fragment/date - make xhtml xhtml-nochunks || die "failed to make docs" - fi - - if use epydoc; then - einfo "Generating api docs" - mkdir "${WORKDIR}"/api - local my_modules epydoc_opts="" - # A name collision between the portage.dbapi class and the - # module with the same name triggers an epydoc crash unless - # portage.dbapi is excluded from introspection. - ROOT=/ has_version '>=dev-python/epydoc-3_pre0' && \ - epydoc_opts='--exclude-introspect portage\.dbapi' - my_modules="$(find "${S}/pym" -name "*.py" \ - | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ - -e 's:/:.:g' | sort)" || die "error listing modules" - # workaround for bug 282760 - > "$S/pym/pysqlite2.py" - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - epydoc -o "${WORKDIR}"/api \ - -qqqqq --no-frames --show-imports $epydoc_opts \ - --name "${PN}" --url "${HOMEPAGE}" \ - ${my_modules} || die "epydoc failed" - rm "$S/pym/pysqlite2.py" - fi -} - -src_test() { - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - ./pym/portage/tests/runTests || die "test(s) failed" -} - -src_install() { - local libdir=$(get_libdir) - local portage_base="/usr/${libdir}/portage" - local portage_share_config=/usr/share/portage/config - - cd "${S}"/cnf - insinto /etc - doins etc-update.conf dispatch-conf.conf || die - - dodir "${portage_share_config}" - insinto "${portage_share_config}" - doins "${S}/cnf/make.globals" || die - if [ -f "make.conf.${ARCH}".diff ]; then - patch make.conf "make.conf.${ARCH}".diff || \ - die "Failed to patch make.conf.example" - newins make.conf make.conf.example || die - else - eerror "" - eerror "Portage does not have an arch-specific configuration for this arch." - eerror "Please notify the arch maintainer about this issue. Using generic." - eerror "" - newins make.conf make.conf.example || die - fi - - dosym ..${portage_share_config}/make.globals /etc/make.globals - - insinto /etc/logrotate.d - doins "${S}"/cnf/logrotate.d/elog-save-summary || die - - # BSD and OSX need a sed wrapper so that find/xargs work properly - if use userland_GNU; then - rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" - fi - - local x symlinks - - for x in $(find "$S"/bin -type d) ; do - x=${x#$S/} - exeinto $portage_base/$x || die "exeinto failed" - cd "$S"/$x || die "cd failed" - doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \ - die "doexe failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - for x in $(find "$S"/pym -type d) ; do - x=${x#$S/} - insinto $portage_base/$x || die "insinto failed" - cd "$S"/$x || die "cd failed" - doins *.py || die "doins failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - # Symlinks to directories cause up/downgrade issues and the use of these - # modules outside of portage is probably negligible. - for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do - [ ! -L "${x}" ] && continue - die "symlink to directory will cause upgrade/downgrade issues: '${x}'" - done - - exeinto ${portage_base}/pym/portage/tests - doexe "${S}"/pym/portage/tests/runTests - - doman "${S}"/man/*.[0-9] - if use linguas_pl; then - doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] - doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] - fi - - dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} - use doc && dohtml -r "${S}"/doc/* - use epydoc && dohtml -r "${WORKDIR}"/api - - dodir /usr/bin - for x in ebuild egencache emerge portageq repoman ; do - dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} - done - - dodir /usr/sbin - local my_syms="archive-conf - dispatch-conf - emaint - emerge-webrsync - env-update - etc-update - fixpackages - quickpkg - regenworld" - local x - for x in ${my_syms}; do - dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} - done - dosym env-update /usr/sbin/update-env - dosym etc-update /usr/sbin/update-etc - - dodir /etc/portage - keepdir /etc/portage -} - -pkg_preinst() { - if ! use build && ! has_version dev-python/pycrypto && \ - ! has_version '>=dev-lang/python-2.6[ssl]' ; then - ewarn "If you are an ebuild developer and you plan to commit ebuilds" - ewarn "with this system then please install dev-python/pycrypto or" - ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" - ewarn "to enable RMD160 hash support." - ewarn "See bug #198398 for more information." - fi - if [ -f "${ROOT}/etc/make.globals" ]; then - rm "${ROOT}/etc/make.globals" - fi - - [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" - REPO_LAYOUT_CONF_WARN=$? -} - -pkg_postinst() { - # Compile all source files recursively. Any orphans - # will be identified and removed in postrm. - python_mod_optimize /usr/$(get_libdir)/portage/pym - - local warning_shown=0 - if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then - ewarn - echo "If you want overlay eclasses to override eclasses from" \ - "other repos then see the portage(5) man page" \ - "for information about the new layout.conf and repos.conf" \ - "configuration files." \ - | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done - fi - if [ $warning_shown = 1 ] ; then - ewarn # for symmetry - fi - - einfo - einfo "For help with using portage please consult the Gentoo Handbook" - einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" - einfo -} - -pkg_postrm() { - python_mod_cleanup /usr/$(get_libdir)/portage/pym -} diff --git a/sys-apps/portage/portage-2.1.9.24.ebuild b/sys-apps/portage/portage-2.1.9.24.ebuild deleted file mode 100644 index c330c8d..0000000 --- a/sys-apps/portage/portage-2.1.9.24.ebuild +++ /dev/null @@ -1,312 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/Attic/portage-2.1.9.24.ebuild,v 1.6 2010/12/27 15:36:48 ranger Exp $ - -# Require EAPI 2 since we now require at least python-2.6 (for python 3 -# syntax support) which also requires EAPI 2. -EAPI=2 -inherit eutils multilib python - -DESCRIPTION="Portage is the package management and distribution system for Gentoo" -HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" -LICENSE="GPL-2" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" -PROVIDE="virtual/portage" -SLOT="0" -IUSE="build doc epydoc +ipc linguas_pl python3 selinux" - -python_dep="python3? ( =dev-lang/python-3* ) - !python3? ( - build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 ) ) - !build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) ) - )" - -# The pysqlite blocker is for bug #282760. -DEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 ) - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) - epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" - -RDEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 - >=app-shells/bash-3.2_p17 - >=app-admin/eselect-1.2 ) - elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) - elibc_glibc? ( >=sys-apps/sandbox-1.6 ) - elibc_uclibc? ( >=sys-apps/sandbox-1.6 ) - >=app-misc/pax-utils-0.1.17 - selinux? ( sys-libs/libselinux ) - != 0x2060000 and "good" or "bad")') = good ]] -} - -pkg_setup() { - if ! use python3 && ! compatible_python_is_selected ; then - ewarn "Attempting to select a compatible default python interpreter" - local x success=0 - for x in /usr/bin/python2.* ; do - x=${x#/usr/bin/python2.} - if [[ $x -ge 6 ]] 2>/dev/null ; then - eselect python set python2.$x - if compatible_python_is_selected ; then - elog "Default python interpreter is now set to python-2.$x" - success=1 - break - fi - fi - done - if [ $success != 1 ] ; then - eerror "Unable to select a compatible default python interpreter!" - die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." - fi - fi - - if use python3; then - python_set_active_version 3 - fi -} - -src_prepare() { - if [ -n "${PATCHVER}" ] ; then - if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then - rm "$S/bin/ebuild-helpers/portageq" \ - || die "failed to remove portageq helper symlink" - fi - epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" - fi - einfo "Setting portage.VERSION to ${PVR} ..." - sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ - die "Failed to patch portage.VERSION" - sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ - die "Failed to patch VERSION in doc/fragment/version" - sed -e "1s/VERSION/${PVR}/" -i man/* || \ - die "Failed to patch VERSION in man page headers" - - if ! use ipc ; then - einfo "Disabling ipc..." - sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ - -i pym/_emerge/AbstractEbuildProcess.py || \ - die "failed to patch AbstractEbuildProcess.py" - fi - - if use python3; then - einfo "Converting shebangs for python3..." - python_convert_shebangs -r 3 . - fi -} - -src_compile() { - if use doc; then - cd "${S}"/doc - touch fragment/date - make xhtml xhtml-nochunks || die "failed to make docs" - fi - - if use epydoc; then - einfo "Generating api docs" - mkdir "${WORKDIR}"/api - local my_modules epydoc_opts="" - my_modules="$(find "${S}/pym" -name "*.py" \ - | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ - -e 's:/:.:g' | sort)" || die "error listing modules" - # workaround for bug 282760 - > "$S/pym/pysqlite2.py" - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - epydoc -o "${WORKDIR}"/api \ - -qqqqq --no-frames --show-imports $epydoc_opts \ - --name "${PN}" --url "${HOMEPAGE}" \ - ${my_modules} || die "epydoc failed" - rm "$S/pym/pysqlite2.py" - fi -} - -src_test() { - # make files executable, in case they were created by patch - find bin -type f | xargs chmod +x - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - ./pym/portage/tests/runTests || die "test(s) failed" -} - -src_install() { - local libdir=$(get_libdir) - local portage_base="/usr/${libdir}/portage" - local portage_share_config=/usr/share/portage/config - - cd "${S}"/cnf - insinto /etc - doins etc-update.conf dispatch-conf.conf || die - - insinto "$portage_share_config" - doins "$S/cnf/make.globals" || die - if [ -f "make.conf.${ARCH}".diff ]; then - patch make.conf "make.conf.${ARCH}".diff || \ - die "Failed to patch make.conf.example" - newins make.conf make.conf.example || die - else - eerror "" - eerror "Portage does not have an arch-specific configuration for this arch." - eerror "Please notify the arch maintainer about this issue. Using generic." - eerror "" - newins make.conf make.conf.example || die - fi - - dosym ..${portage_share_config}/make.globals /etc/make.globals - - insinto /etc/logrotate.d - doins "${S}"/cnf/logrotate.d/elog-save-summary || die - - # BSD and OSX need a sed wrapper so that find/xargs work properly - if use userland_GNU; then - rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" - fi - - local x symlinks - - cd "$S" || die "cd failed" - for x in $(find bin -type d) ; do - exeinto $portage_base/$x || die "exeinto failed" - cd "$S"/$x || die "cd failed" - doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \ - die "doexe failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - cd "$S" || die "cd failed" - for x in $(find pym/* -type d) ; do - insinto $portage_base/$x || die "insinto failed" - cd "$S"/$x || die "cd failed" - # __pycache__ directories contain no py files - [[ "*.py" != $(echo *.py) ]] || continue - doins *.py || die "doins failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - # Symlinks to directories cause up/downgrade issues and the use of these - # modules outside of portage is probably negligible. - for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do - [ ! -L "${x}" ] && continue - die "symlink to directory will cause upgrade/downgrade issues: '${x}'" - done - - exeinto ${portage_base}/pym/portage/tests - doexe "${S}"/pym/portage/tests/runTests - - doman "${S}"/man/*.[0-9] - if use linguas_pl; then - doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] - doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] - fi - - dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} - use doc && dohtml -r "${S}"/doc/* - use epydoc && dohtml -r "${WORKDIR}"/api - - dodir /usr/bin - for x in ebuild egencache emerge portageq quickpkg repoman ; do - dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} - done - - dodir /usr/sbin - local my_syms="archive-conf - dispatch-conf - emaint - emerge-webrsync - env-update - etc-update - fixpackages - regenworld" - local x - for x in ${my_syms}; do - dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} - done - dosym env-update /usr/sbin/update-env - dosym etc-update /usr/sbin/update-etc - - dodir /etc/portage - keepdir /etc/portage -} - -pkg_preinst() { - if ! use build && ! has_version dev-python/pycrypto && \ - ! has_version '>=dev-lang/python-2.6[ssl]' ; then - ewarn "If you are an ebuild developer and you plan to commit ebuilds" - ewarn "with this system then please install dev-python/pycrypto or" - ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" - ewarn "to enable RMD160 hash support." - ewarn "See bug #198398 for more information." - fi - if [ -f "${ROOT}/etc/make.globals" ]; then - rm "${ROOT}/etc/make.globals" - fi - - [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" - REPO_LAYOUT_CONF_WARN=$? -} - -pkg_postinst() { - # Compile all source files recursively. Any orphans - # will be identified and removed in postrm. - python_mod_optimize /usr/$(get_libdir)/portage/pym - - if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then - ewarn - echo "If you want overlay eclasses to override eclasses from" \ - "other repos then see the portage(5) man page" \ - "for information about the new layout.conf and repos.conf" \ - "configuration files." \ - | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done - ewarn - fi - - einfo - einfo "For help with using portage please consult the Gentoo Handbook" - einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" - einfo -} - -pkg_postrm() { - python_mod_cleanup /usr/$(get_libdir)/portage/pym -} diff --git a/sys-apps/portage/portage-2.1.9.25.ebuild b/sys-apps/portage/portage-2.1.9.25.ebuild deleted file mode 100644 index 222cf6f..0000000 --- a/sys-apps/portage/portage-2.1.9.25.ebuild +++ /dev/null @@ -1,313 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/Attic/portage-2.1.9.25.ebuild,v 1.6 2010/12/28 17:00:17 maekke Exp $ - -# Require EAPI 2 since we now require at least python-2.6 (for python 3 -# syntax support) which also requires EAPI 2. -EAPI=2 -inherit eutils multilib python - -DESCRIPTION="Portage is the package management and distribution system for Gentoo" -HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" -LICENSE="GPL-2" -KEYWORDS="~alpha amd64 arm hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd" -PROVIDE="virtual/portage" -SLOT="0" -IUSE="build doc epydoc +ipc linguas_pl python3 selinux" - -python_dep="python3? ( =dev-lang/python-3* ) - !python3? ( - build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 ) ) - !build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) ) - )" - -# The pysqlite blocker is for bug #282760. -DEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 ) - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) - epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" - -RDEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 - >=app-shells/bash-3.2_p17 - >=app-admin/eselect-1.2 ) - elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) - elibc_glibc? ( >=sys-apps/sandbox-1.6 ) - elibc_uclibc? ( >=sys-apps/sandbox-1.6 ) - >=app-misc/pax-utils-0.1.17 - selinux? ( sys-libs/libselinux ) - != 0x2060000 and "good" or "bad")') = good ]] -} - -pkg_setup() { - if ! use python3 && ! compatible_python_is_selected ; then - ewarn "Attempting to select a compatible default python interpreter" - local x success=0 - for x in /usr/bin/python2.* ; do - x=${x#/usr/bin/python2.} - if [[ $x -ge 6 ]] 2>/dev/null ; then - eselect python set python2.$x - if compatible_python_is_selected ; then - elog "Default python interpreter is now set to python-2.$x" - success=1 - break - fi - fi - done - if [ $success != 1 ] ; then - eerror "Unable to select a compatible default python interpreter!" - die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." - fi - fi - - if use python3; then - python_set_active_version 3 - fi -} - -src_prepare() { - if [ -n "${PATCHVER}" ] ; then - if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then - rm "$S/bin/ebuild-helpers/portageq" \ - || die "failed to remove portageq helper symlink" - fi - epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" - fi - einfo "Setting portage.VERSION to ${PVR} ..." - sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ - die "Failed to patch portage.VERSION" - sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ - die "Failed to patch VERSION in doc/fragment/version" - sed -e "1s/VERSION/${PVR}/" -i man/* || \ - die "Failed to patch VERSION in man page headers" - - if ! use ipc ; then - einfo "Disabling ipc..." - sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ - -i pym/_emerge/AbstractEbuildProcess.py || \ - die "failed to patch AbstractEbuildProcess.py" - fi - - if use python3; then - einfo "Converting shebangs for python3..." - python_convert_shebangs -r 3 . - fi -} - -src_compile() { - if use doc; then - cd "${S}"/doc - touch fragment/date - make xhtml xhtml-nochunks || die "failed to make docs" - fi - - if use epydoc; then - einfo "Generating api docs" - mkdir "${WORKDIR}"/api - local my_modules epydoc_opts="" - my_modules="$(find "${S}/pym" -name "*.py" \ - | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ - -e 's:/:.:g' | sort)" || die "error listing modules" - # workaround for bug 282760 - > "$S/pym/pysqlite2.py" - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - epydoc -o "${WORKDIR}"/api \ - -qqqqq --no-frames --show-imports $epydoc_opts \ - --name "${PN}" --url "${HOMEPAGE}" \ - ${my_modules} || die "epydoc failed" - rm "$S/pym/pysqlite2.py" - fi -} - -src_test() { - # make files executable, in case they were created by patch - find bin -type f | xargs chmod +x - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - ./pym/portage/tests/runTests || die "test(s) failed" -} - -src_install() { - local libdir=$(get_libdir) - local portage_base="/usr/${libdir}/portage" - local portage_share_config=/usr/share/portage/config - - cd "${S}"/cnf - insinto /etc - doins etc-update.conf dispatch-conf.conf || die - - insinto "$portage_share_config" - doins "$S/cnf/make.globals" || die - if [ -f "make.conf.${ARCH}".diff ]; then - patch make.conf "make.conf.${ARCH}".diff || \ - die "Failed to patch make.conf.example" - newins make.conf make.conf.example || die - else - eerror "" - eerror "Portage does not have an arch-specific configuration for this arch." - eerror "Please notify the arch maintainer about this issue. Using generic." - eerror "" - newins make.conf make.conf.example || die - fi - - dosym ..${portage_share_config}/make.globals /etc/make.globals - - insinto /etc/logrotate.d - doins "${S}"/cnf/logrotate.d/elog-save-summary || die - - # BSD and OSX need a sed wrapper so that find/xargs work properly - if use userland_GNU; then - rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" - fi - - local x symlinks - - cd "$S" || die "cd failed" - for x in $(find bin -type d) ; do - exeinto $portage_base/$x || die "exeinto failed" - cd "$S"/$x || die "cd failed" - doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \ - die "doexe failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - cd "$S" || die "cd failed" - for x in $(find pym/* -type d) ; do - insinto $portage_base/$x || die "insinto failed" - cd "$S"/$x || die "cd failed" - # __pycache__ directories contain no py files - [[ "*.py" != $(echo *.py) ]] || continue - doins *.py || die "doins failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - # Symlinks to directories cause up/downgrade issues and the use of these - # modules outside of portage is probably negligible. - for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do - [ ! -L "${x}" ] && continue - die "symlink to directory will cause upgrade/downgrade issues: '${x}'" - done - - exeinto ${portage_base}/pym/portage/tests - doexe "${S}"/pym/portage/tests/runTests - - doman "${S}"/man/*.[0-9] - if use linguas_pl; then - doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] - doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] - fi - - dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} - use doc && dohtml -r "${S}"/doc/* - use epydoc && dohtml -r "${WORKDIR}"/api - - dodir /usr/bin - for x in ebuild egencache emerge portageq quickpkg repoman ; do - dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} - done - - dodir /usr/sbin - local my_syms="archive-conf - dispatch-conf - emaint - emerge-webrsync - env-update - etc-update - fixpackages - regenworld" - local x - for x in ${my_syms}; do - dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} - done - dosym env-update /usr/sbin/update-env - dosym etc-update /usr/sbin/update-etc - - dodir /etc/portage - keepdir /etc/portage -} - -pkg_preinst() { - if ! use build && ! has_version dev-python/pycrypto && \ - ! has_version '>=dev-lang/python-2.6[ssl]' ; then - ewarn "If you are an ebuild developer and you plan to commit ebuilds" - ewarn "with this system then please install dev-python/pycrypto or" - ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" - ewarn "to enable RMD160 hash support." - ewarn "See bug #198398 for more information." - fi - if [ -f "${ROOT}/etc/make.globals" ]; then - rm "${ROOT}/etc/make.globals" - fi - - [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" - REPO_LAYOUT_CONF_WARN=$? -} - -pkg_postinst() { - # Compile all source files recursively. Any orphans - # will be identified and removed in postrm. - python_mod_optimize /usr/$(get_libdir)/portage/pym - - if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then - ewarn - echo "If you want overlay eclasses to override eclasses from" \ - "other repos then see the portage(5) man page" \ - "for information about the new layout.conf and repos.conf" \ - "configuration files." \ - | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done - ewarn - fi - - einfo - einfo "For help with using portage please consult the Gentoo Handbook" - einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" - einfo -} - -pkg_postrm() { - python_mod_cleanup /usr/$(get_libdir)/portage/pym -} diff --git a/sys-apps/portage/portage-2.1.9.26.ebuild b/sys-apps/portage/portage-2.1.9.26.ebuild deleted file mode 100644 index e2ffe12..0000000 --- a/sys-apps/portage/portage-2.1.9.26.ebuild +++ /dev/null @@ -1,313 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/Attic/portage-2.1.9.26.ebuild,v 1.1 2010/12/21 18:55:43 zmedico Exp $ - -# Require EAPI 2 since we now require at least python-2.6 (for python 3 -# syntax support) which also requires EAPI 2. -EAPI=2 -inherit eutils multilib python - -DESCRIPTION="Portage is the package management and distribution system for Gentoo" -HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" -LICENSE="GPL-2" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -PROVIDE="virtual/portage" -SLOT="0" -IUSE="build doc epydoc +ipc linguas_pl python3 selinux" - -python_dep="python3? ( =dev-lang/python-3* ) - !python3? ( - build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 ) ) - !build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) ) - )" - -# The pysqlite blocker is for bug #282760. -DEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 ) - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) - epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" - -RDEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 - >=app-shells/bash-3.2_p17 - >=app-admin/eselect-1.2 ) - elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) - elibc_glibc? ( >=sys-apps/sandbox-1.6 ) - elibc_uclibc? ( >=sys-apps/sandbox-1.6 ) - >=app-misc/pax-utils-0.1.17 - selinux? ( sys-libs/libselinux ) - != 0x2060000 and "good" or "bad")') = good ]] -} - -pkg_setup() { - if ! use python3 && ! compatible_python_is_selected ; then - ewarn "Attempting to select a compatible default python interpreter" - local x success=0 - for x in /usr/bin/python2.* ; do - x=${x#/usr/bin/python2.} - if [[ $x -ge 6 ]] 2>/dev/null ; then - eselect python set python2.$x - if compatible_python_is_selected ; then - elog "Default python interpreter is now set to python-2.$x" - success=1 - break - fi - fi - done - if [ $success != 1 ] ; then - eerror "Unable to select a compatible default python interpreter!" - die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." - fi - fi - - if use python3; then - python_set_active_version 3 - fi -} - -src_prepare() { - if [ -n "${PATCHVER}" ] ; then - if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then - rm "$S/bin/ebuild-helpers/portageq" \ - || die "failed to remove portageq helper symlink" - fi - epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" - fi - einfo "Setting portage.VERSION to ${PVR} ..." - sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ - die "Failed to patch portage.VERSION" - sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ - die "Failed to patch VERSION in doc/fragment/version" - sed -e "1s/VERSION/${PVR}/" -i man/* || \ - die "Failed to patch VERSION in man page headers" - - if ! use ipc ; then - einfo "Disabling ipc..." - sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ - -i pym/_emerge/AbstractEbuildProcess.py || \ - die "failed to patch AbstractEbuildProcess.py" - fi - - if use python3; then - einfo "Converting shebangs for python3..." - python_convert_shebangs -r 3 . - fi -} - -src_compile() { - if use doc; then - cd "${S}"/doc - touch fragment/date - make xhtml xhtml-nochunks || die "failed to make docs" - fi - - if use epydoc; then - einfo "Generating api docs" - mkdir "${WORKDIR}"/api - local my_modules epydoc_opts="" - my_modules="$(find "${S}/pym" -name "*.py" \ - | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ - -e 's:/:.:g' | sort)" || die "error listing modules" - # workaround for bug 282760 - > "$S/pym/pysqlite2.py" - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - epydoc -o "${WORKDIR}"/api \ - -qqqqq --no-frames --show-imports $epydoc_opts \ - --name "${PN}" --url "${HOMEPAGE}" \ - ${my_modules} || die "epydoc failed" - rm "$S/pym/pysqlite2.py" - fi -} - -src_test() { - # make files executable, in case they were created by patch - find bin -type f | xargs chmod +x - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - ./pym/portage/tests/runTests || die "test(s) failed" -} - -src_install() { - local libdir=$(get_libdir) - local portage_base="/usr/${libdir}/portage" - local portage_share_config=/usr/share/portage/config - - cd "${S}"/cnf - insinto /etc - doins etc-update.conf dispatch-conf.conf || die - - insinto "$portage_share_config" - doins "$S/cnf/make.globals" || die - if [ -f "make.conf.${ARCH}".diff ]; then - patch make.conf "make.conf.${ARCH}".diff || \ - die "Failed to patch make.conf.example" - newins make.conf make.conf.example || die - else - eerror "" - eerror "Portage does not have an arch-specific configuration for this arch." - eerror "Please notify the arch maintainer about this issue. Using generic." - eerror "" - newins make.conf make.conf.example || die - fi - - dosym ..${portage_share_config}/make.globals /etc/make.globals - - insinto /etc/logrotate.d - doins "${S}"/cnf/logrotate.d/elog-save-summary || die - - # BSD and OSX need a sed wrapper so that find/xargs work properly - if use userland_GNU; then - rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" - fi - - local x symlinks - - cd "$S" || die "cd failed" - for x in $(find bin -type d) ; do - exeinto $portage_base/$x || die "exeinto failed" - cd "$S"/$x || die "cd failed" - doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \ - die "doexe failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - cd "$S" || die "cd failed" - for x in $(find pym/* -type d) ; do - insinto $portage_base/$x || die "insinto failed" - cd "$S"/$x || die "cd failed" - # __pycache__ directories contain no py files - [[ "*.py" != $(echo *.py) ]] || continue - doins *.py || die "doins failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - # Symlinks to directories cause up/downgrade issues and the use of these - # modules outside of portage is probably negligible. - for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do - [ ! -L "${x}" ] && continue - die "symlink to directory will cause upgrade/downgrade issues: '${x}'" - done - - exeinto ${portage_base}/pym/portage/tests - doexe "${S}"/pym/portage/tests/runTests - - doman "${S}"/man/*.[0-9] - if use linguas_pl; then - doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] - doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] - fi - - dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} - use doc && dohtml -r "${S}"/doc/* - use epydoc && dohtml -r "${WORKDIR}"/api - - dodir /usr/bin - for x in ebuild egencache emerge portageq quickpkg repoman ; do - dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} - done - - dodir /usr/sbin - local my_syms="archive-conf - dispatch-conf - emaint - emerge-webrsync - env-update - etc-update - fixpackages - regenworld" - local x - for x in ${my_syms}; do - dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} - done - dosym env-update /usr/sbin/update-env - dosym etc-update /usr/sbin/update-etc - - dodir /etc/portage - keepdir /etc/portage -} - -pkg_preinst() { - if ! use build && ! has_version dev-python/pycrypto && \ - ! has_version '>=dev-lang/python-2.6[ssl]' ; then - ewarn "If you are an ebuild developer and you plan to commit ebuilds" - ewarn "with this system then please install dev-python/pycrypto or" - ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" - ewarn "to enable RMD160 hash support." - ewarn "See bug #198398 for more information." - fi - if [ -f "${ROOT}/etc/make.globals" ]; then - rm "${ROOT}/etc/make.globals" - fi - - [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" - REPO_LAYOUT_CONF_WARN=$? -} - -pkg_postinst() { - # Compile all source files recursively. Any orphans - # will be identified and removed in postrm. - python_mod_optimize /usr/$(get_libdir)/portage/pym - - if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then - ewarn - echo "If you want overlay eclasses to override eclasses from" \ - "other repos then see the portage(5) man page" \ - "for information about the new layout.conf and repos.conf" \ - "configuration files." \ - | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done - ewarn - fi - - einfo - einfo "For help with using portage please consult the Gentoo Handbook" - einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" - einfo -} - -pkg_postrm() { - python_mod_cleanup /usr/$(get_libdir)/portage/pym -} diff --git a/sys-apps/portage/portage-2.1.9.27.ebuild b/sys-apps/portage/portage-2.1.9.27.ebuild deleted file mode 100644 index 3c9db19..0000000 --- a/sys-apps/portage/portage-2.1.9.27.ebuild +++ /dev/null @@ -1,313 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/Attic/portage-2.1.9.27.ebuild,v 1.1 2010/12/31 09:58:12 zmedico Exp $ - -# Require EAPI 2 since we now require at least python-2.6 (for python 3 -# syntax support) which also requires EAPI 2. -EAPI=2 -inherit eutils multilib python - -DESCRIPTION="Portage is the package management and distribution system for Gentoo" -HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" -LICENSE="GPL-2" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -PROVIDE="virtual/portage" -SLOT="0" -IUSE="build doc epydoc +ipc linguas_pl python3 selinux" - -python_dep="python3? ( =dev-lang/python-3* ) - !python3? ( - build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 ) ) - !build? ( || ( dev-lang/python:2.8 dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) ) - )" - -# The pysqlite blocker is for bug #282760. -DEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 ) - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) - epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" - -RDEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 - >=app-shells/bash-3.2_p17 - >=app-admin/eselect-1.2 ) - elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) - elibc_glibc? ( >=sys-apps/sandbox-1.6 ) - elibc_uclibc? ( >=sys-apps/sandbox-1.6 ) - >=app-misc/pax-utils-0.1.17 - selinux? ( sys-libs/libselinux ) - != 0x2060000 and "good" or "bad")') = good ]] -} - -pkg_setup() { - if ! use python3 && ! compatible_python_is_selected ; then - ewarn "Attempting to select a compatible default python interpreter" - local x success=0 - for x in /usr/bin/python2.* ; do - x=${x#/usr/bin/python2.} - if [[ $x -ge 6 ]] 2>/dev/null ; then - eselect python set python2.$x - if compatible_python_is_selected ; then - elog "Default python interpreter is now set to python-2.$x" - success=1 - break - fi - fi - done - if [ $success != 1 ] ; then - eerror "Unable to select a compatible default python interpreter!" - die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." - fi - fi - - if use python3; then - python_set_active_version 3 - fi -} - -src_prepare() { - if [ -n "${PATCHVER}" ] ; then - if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then - rm "$S/bin/ebuild-helpers/portageq" \ - || die "failed to remove portageq helper symlink" - fi - epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" - fi - einfo "Setting portage.VERSION to ${PVR} ..." - sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ - die "Failed to patch portage.VERSION" - sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ - die "Failed to patch VERSION in doc/fragment/version" - sed -e "1s/VERSION/${PVR}/" -i man/* || \ - die "Failed to patch VERSION in man page headers" - - if ! use ipc ; then - einfo "Disabling ipc..." - sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ - -i pym/_emerge/AbstractEbuildProcess.py || \ - die "failed to patch AbstractEbuildProcess.py" - fi - - if use python3; then - einfo "Converting shebangs for python3..." - python_convert_shebangs -r 3 . - fi -} - -src_compile() { - if use doc; then - cd "${S}"/doc - touch fragment/date - make xhtml xhtml-nochunks || die "failed to make docs" - fi - - if use epydoc; then - einfo "Generating api docs" - mkdir "${WORKDIR}"/api - local my_modules epydoc_opts="" - my_modules="$(find "${S}/pym" -name "*.py" \ - | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ - -e 's:/:.:g' | sort)" || die "error listing modules" - # workaround for bug 282760 - > "$S/pym/pysqlite2.py" - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - epydoc -o "${WORKDIR}"/api \ - -qqqqq --no-frames --show-imports $epydoc_opts \ - --name "${PN}" --url "${HOMEPAGE}" \ - ${my_modules} || die "epydoc failed" - rm "$S/pym/pysqlite2.py" - fi -} - -src_test() { - # make files executable, in case they were created by patch - find bin -type f | xargs chmod +x - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - ./pym/portage/tests/runTests || die "test(s) failed" -} - -src_install() { - local libdir=$(get_libdir) - local portage_base="/usr/${libdir}/portage" - local portage_share_config=/usr/share/portage/config - - cd "${S}"/cnf - insinto /etc - doins etc-update.conf dispatch-conf.conf || die - - insinto "$portage_share_config" - doins "$S/cnf/make.globals" || die - if [ -f "make.conf.${ARCH}".diff ]; then - patch make.conf "make.conf.${ARCH}".diff || \ - die "Failed to patch make.conf.example" - newins make.conf make.conf.example || die - else - eerror "" - eerror "Portage does not have an arch-specific configuration for this arch." - eerror "Please notify the arch maintainer about this issue. Using generic." - eerror "" - newins make.conf make.conf.example || die - fi - - dosym ..${portage_share_config}/make.globals /etc/make.globals - - insinto /etc/logrotate.d - doins "${S}"/cnf/logrotate.d/elog-save-summary || die - - # BSD and OSX need a sed wrapper so that find/xargs work properly - if use userland_GNU; then - rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" - fi - - local x symlinks - - cd "$S" || die "cd failed" - for x in $(find bin -type d) ; do - exeinto $portage_base/$x || die "exeinto failed" - cd "$S"/$x || die "cd failed" - doexe $(find . -mindepth 1 -maxdepth 1 -type f ! -type l) || \ - die "doexe failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - cd "$S" || die "cd failed" - for x in $(find pym/* -type d) ; do - insinto $portage_base/$x || die "insinto failed" - cd "$S"/$x || die "cd failed" - # __pycache__ directories contain no py files - [[ "*.py" != $(echo *.py) ]] || continue - doins *.py || die "doins failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - # Symlinks to directories cause up/downgrade issues and the use of these - # modules outside of portage is probably negligible. - for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do - [ ! -L "${x}" ] && continue - die "symlink to directory will cause upgrade/downgrade issues: '${x}'" - done - - exeinto ${portage_base}/pym/portage/tests - doexe "${S}"/pym/portage/tests/runTests - - doman "${S}"/man/*.[0-9] - if use linguas_pl; then - doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] - doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] - fi - - dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} - use doc && dohtml -r "${S}"/doc/* - use epydoc && dohtml -r "${WORKDIR}"/api - - dodir /usr/bin - for x in ebuild egencache emerge portageq quickpkg repoman ; do - dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} - done - - dodir /usr/sbin - local my_syms="archive-conf - dispatch-conf - emaint - emerge-webrsync - env-update - etc-update - fixpackages - regenworld" - local x - for x in ${my_syms}; do - dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} - done - dosym env-update /usr/sbin/update-env - dosym etc-update /usr/sbin/update-etc - - dodir /etc/portage - keepdir /etc/portage -} - -pkg_preinst() { - if ! use build && ! has_version dev-python/pycrypto && \ - ! has_version '>=dev-lang/python-2.6[ssl]' ; then - ewarn "If you are an ebuild developer and you plan to commit ebuilds" - ewarn "with this system then please install dev-python/pycrypto or" - ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" - ewarn "to enable RMD160 hash support." - ewarn "See bug #198398 for more information." - fi - if [ -f "${ROOT}/etc/make.globals" ]; then - rm "${ROOT}/etc/make.globals" - fi - - [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" - REPO_LAYOUT_CONF_WARN=$? -} - -pkg_postinst() { - # Compile all source files recursively. Any orphans - # will be identified and removed in postrm. - python_mod_optimize /usr/$(get_libdir)/portage/pym - - if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then - ewarn - echo "If you want overlay eclasses to override eclasses from" \ - "other repos then see the portage(5) man page" \ - "for information about the new layout.conf and repos.conf" \ - "configuration files." \ - | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done - ewarn - fi - - einfo - einfo "For help with using portage please consult the Gentoo Handbook" - einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" - einfo -} - -pkg_postrm() { - python_mod_cleanup /usr/$(get_libdir)/portage/pym -} diff --git a/sys-apps/portage/portage-2.1.9.42.ebuild b/sys-apps/portage/portage-2.1.9.42.ebuild deleted file mode 100644 index ddb1db7..0000000 --- a/sys-apps/portage/portage-2.1.9.42.ebuild +++ /dev/null @@ -1,329 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/Attic/portage-2.1.9.42.ebuild,v 1.11 2011/06/08 07:59:07 zmedico Exp $ - -# Require EAPI 2 since we now require at least python-2.6 (for python 3 -# syntax support) which also requires EAPI 2. -EAPI=2 -inherit eutils multilib python - -DESCRIPTION="Portage is the package management and distribution system for Gentoo" -HOMEPAGE="http://www.gentoo.org/proj/en/portage/index.xml" -LICENSE="GPL-2" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" -SLOT="0" -IUSE="build doc epydoc +ipc +less linguas_pl python2 python3 selinux" - -python_dep="python3? ( =dev-lang/python-3* ) - !python2? ( !python3? ( - build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 ) ) - !build? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 >=dev-lang/python-3 ) ) - ) ) - python2? ( !python3? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 ) ) )" - -# The pysqlite blocker is for bug #282760. -DEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 ) - doc? ( app-text/xmlto ~app-text/docbook-xml-dtd-4.4 ) - epydoc? ( >=dev-python/epydoc-2.0 !<=dev-python/pysqlite-2.4.1 )" - -RDEPEND="${python_dep} - !build? ( >=sys-apps/sed-4.0.5 - >=app-shells/bash-3.2_p17 - >=app-admin/eselect-1.2 ) - elibc_FreeBSD? ( sys-freebsd/freebsd-bin ) - elibc_glibc? ( >=sys-apps/sandbox-1.6 ) - elibc_uclibc? ( >=sys-apps/sandbox-1.6 ) - >=app-misc/pax-utils-0.1.17 - selinux? ( || ( >=sys-libs/libselinux-2.0.94[python] = 0x2060000 and "good" or "bad")') = good ]] -} - -pkg_setup() { - # Bug #359731 - Die early if get_libdir fails. - [[ -z $(get_libdir) ]] && \ - die "get_libdir returned an empty string" - - if use python2 && use python3 ; then - ewarn "Both python2 and python3 USE flags are enabled, but only one" - ewarn "can be in the shebangs. Using python3." - fi - if ! use python2 && ! use python3 && ! compatible_python_is_selected ; then - ewarn "Attempting to select a compatible default python interpreter" - local x success=0 - for x in /usr/bin/python2.* ; do - x=${x#/usr/bin/python2.} - if [[ $x -ge 6 ]] 2>/dev/null ; then - eselect python set python2.$x - if compatible_python_is_selected ; then - elog "Default python interpreter is now set to python-2.$x" - success=1 - break - fi - fi - done - if [ $success != 1 ] ; then - eerror "Unable to select a compatible default python interpreter!" - die "This version of portage requires at least python-2.6 to be selected as the default python interpreter (see \`eselect python --help\`)." - fi - fi - - if use python3; then - python_set_active_version 3 - elif use python2; then - python_set_active_version 2 - fi -} - -src_prepare() { - if [ -n "${PATCHVER}" ] ; then - if [[ -L $S/bin/ebuild-helpers/portageq ]] ; then - rm "$S/bin/ebuild-helpers/portageq" \ - || die "failed to remove portageq helper symlink" - fi - epatch "${WORKDIR}/${PN}-${PATCHVER}.patch" - fi - einfo "Setting portage.VERSION to ${PVR} ..." - sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \ - die "Failed to patch portage.VERSION" - sed -e "1s/VERSION/${PVR}/" -i doc/fragment/version || \ - die "Failed to patch VERSION in doc/fragment/version" - sed -e "1s/VERSION/${PVR}/" -i man/* || \ - die "Failed to patch VERSION in man page headers" - - if ! use ipc ; then - einfo "Disabling ipc..." - sed -e "s:_enable_ipc_daemon = True:_enable_ipc_daemon = False:" \ - -i pym/_emerge/AbstractEbuildProcess.py || \ - die "failed to patch AbstractEbuildProcess.py" - fi - - if use python3; then - einfo "Converting shebangs for python3..." - python_convert_shebangs -r 3 . - elif use python2; then - einfo "Converting shebangs for python2..." - python_convert_shebangs -r 2 . - fi -} - -src_compile() { - if use doc; then - cd "${S}"/doc - touch fragment/date - make xhtml xhtml-nochunks || die "failed to make docs" - fi - - if use epydoc; then - einfo "Generating api docs" - mkdir "${WORKDIR}"/api - local my_modules epydoc_opts="" - my_modules="$(find "${S}/pym" -name "*.py" \ - | sed -e 's:/__init__.py$::' -e 's:\.py$::' -e "s:^${S}/pym/::" \ - -e 's:/:.:g' | sort)" || die "error listing modules" - # workaround for bug 282760 - > "$S/pym/pysqlite2.py" - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - epydoc -o "${WORKDIR}"/api \ - -qqqqq --no-frames --show-imports $epydoc_opts \ - --name "${PN}" --url "${HOMEPAGE}" \ - ${my_modules} || die "epydoc failed" - rm "$S/pym/pysqlite2.py" - fi -} - -src_test() { - # make files executable, in case they were created by patch - find bin -type f | xargs chmod +x - PYTHONPATH=${S}/pym:${PYTHONPATH:+:}${PYTHONPATH} \ - ./pym/portage/tests/runTests || die "test(s) failed" -} - -src_install() { - local libdir=$(get_libdir) - local portage_base="/usr/${libdir}/portage" - local portage_share_config=/usr/share/portage/config - - cd "${S}"/cnf - insinto /etc - doins etc-update.conf dispatch-conf.conf || die - - insinto "$portage_share_config" - doins "$S/cnf/make.globals" || die - if [ -f "make.conf.${ARCH}".diff ]; then - patch make.conf "make.conf.${ARCH}".diff || \ - die "Failed to patch make.conf.example" - newins make.conf make.conf.example || die - else - eerror "" - eerror "Portage does not have an arch-specific configuration for this arch." - eerror "Please notify the arch maintainer about this issue. Using generic." - eerror "" - newins make.conf make.conf.example || die - fi - - dosym ..${portage_share_config}/make.globals /etc/make.globals - - insinto /etc/logrotate.d - doins "${S}"/cnf/logrotate.d/elog-save-summary || die - - # BSD and OSX need a sed wrapper so that find/xargs work properly - if use userland_GNU; then - rm "${S}"/bin/ebuild-helpers/sed || die "Failed to remove sed wrapper" - fi - - local x symlinks files - - cd "$S" || die "cd failed" - for x in $(find bin -type d) ; do - exeinto $portage_base/$x || die "exeinto failed" - cd "$S"/$x || die "cd failed" - files=$(find . -mindepth 1 -maxdepth 1 -type f ! -type l) - if [ -n "$files" ] ; then - doexe $files || die "doexe failed" - fi - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - cd "$S" || die "cd failed" - for x in $(find pym/* -type d) ; do - insinto $portage_base/$x || die "insinto failed" - cd "$S"/$x || die "cd failed" - # __pycache__ directories contain no py files - [[ "*.py" != $(echo *.py) ]] || continue - doins *.py || die "doins failed" - symlinks=$(find . -mindepth 1 -maxdepth 1 -type l) - if [ -n "$symlinks" ] ; then - cp -P $symlinks "$D$portage_base/$x" || die "cp failed" - fi - done - - # Symlinks to directories cause up/downgrade issues and the use of these - # modules outside of portage is probably negligible. - for x in "${D}${portage_base}/pym/"{cache,elog_modules} ; do - [ ! -L "${x}" ] && continue - die "symlink to directory will cause upgrade/downgrade issues: '${x}'" - done - - exeinto ${portage_base}/pym/portage/tests - doexe "${S}"/pym/portage/tests/runTests - - doman "${S}"/man/*.[0-9] - if use linguas_pl; then - doman -i18n=pl "${S_PL}"/man/pl/*.[0-9] - doman -i18n=pl_PL.UTF-8 "${S_PL}"/man/pl_PL.UTF-8/*.[0-9] - fi - - dodoc "${S}"/{ChangeLog,NEWS,RELEASE-NOTES} - use doc && dohtml -r "${S}"/doc/* - use epydoc && dohtml -r "${WORKDIR}"/api - - dodir /usr/bin - for x in ebuild egencache emerge portageq quickpkg repoman ; do - dosym ../${libdir}/portage/bin/${x} /usr/bin/${x} - done - - dodir /usr/sbin - local my_syms="archive-conf - dispatch-conf - emaint - emerge-webrsync - env-update - etc-update - fixpackages - regenworld" - local x - for x in ${my_syms}; do - dosym ../${libdir}/portage/bin/${x} /usr/sbin/${x} - done - dosym env-update /usr/sbin/update-env - dosym etc-update /usr/sbin/update-etc - - dodir /etc/portage - keepdir /etc/portage -} - -pkg_preinst() { - if ! use build && ! has_version dev-python/pycrypto && \ - ! has_version '>=dev-lang/python-2.6[ssl]' ; then - ewarn "If you are an ebuild developer and you plan to commit ebuilds" - ewarn "with this system then please install dev-python/pycrypto or" - ewarn "enable the ssl USE flag for >=dev-lang/python-2.6 in order" - ewarn "to enable RMD160 hash support." - ewarn "See bug #198398 for more information." - fi - if [ -f "${ROOT}/etc/make.globals" ]; then - rm "${ROOT}/etc/make.globals" - fi - - [[ -n $PORTDIR_OVERLAY ]] && has_version "<${CATEGORY}/${PN}-2.1.6.12" - REPO_LAYOUT_CONF_WARN=$? -} - -pkg_postinst() { - # Compile all source files recursively. Any orphans - # will be identified and removed in postrm. - python_mod_optimize /usr/$(get_libdir)/portage/pym - - if [ $REPO_LAYOUT_CONF_WARN = 0 ] ; then - ewarn - echo "If you want overlay eclasses to override eclasses from" \ - "other repos then see the portage(5) man page" \ - "for information about the new layout.conf and repos.conf" \ - "configuration files." \ - | fmt -w 75 | while read -r ; do ewarn "$REPLY" ; done - ewarn - fi - - einfo - einfo "For help with using portage please consult the Gentoo Handbook" - einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3" - einfo -} - -pkg_postrm() { - python_mod_cleanup /usr/$(get_libdir)/portage/pym -} From 9f25e5860c9dd1066fdf16bfebac3987e1a321aa Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Tue, 28 Mar 2017 16:07:05 -0600 Subject: [PATCH 6/9] limpieza de versiones viejas de python --- dev-lang/python/Manifest | 5 - dev-lang/python/files/pydoc.conf | 8 - dev-lang/python/files/pydoc.init | 26 --- dev-lang/python/python-2.6.5-r3.ebuild | 311 ------------------------- 4 files changed, 350 deletions(-) delete mode 100644 dev-lang/python/Manifest delete mode 100644 dev-lang/python/files/pydoc.conf delete mode 100755 dev-lang/python/files/pydoc.init delete mode 100644 dev-lang/python/python-2.6.5-r3.ebuild diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest deleted file mode 100644 index f05ed84..0000000 --- a/dev-lang/python/Manifest +++ /dev/null @@ -1,5 +0,0 @@ -AUX pydoc.conf 330 RMD160 0cd619ec251597e0fcadc05bfd249915e73baa17 SHA1 a56100d45378c554b9822f6ed512a6cb7841ef50 SHA256 a45ebba2de5f2b0e963db4101507203d095c5ff667ae5002c4897a9c87786fa1 -AUX pydoc.init 666 RMD160 11caf3a78bce4cdaebacaf21eaf26cc1ce30282e SHA1 88c5cb6d5bf737c74e1be93118cf157630af9ad7 SHA256 0d25c71232b74adb87dc709cc7cd8f8b13c452c0fe82fa33808f907f7a96d628 -DIST Python-2.6.5.tar.bz2 11095581 RMD160 909c6a13749396f2b19fed51821d3e2577b2833b SHA1 24c94f5428a8c94c9d0b316e3019fee721fdb5d1 SHA256 62da62eb685621ede2be1275f11b89fa0e0be578db8daa5320d0a7855c0a9ebc -DIST python-gentoo-patches-2.6.5-r5.tar.bz2 1482491 RMD160 a7978912b8598a589a82746642fa5b676369c599 SHA1 26c983e79ac32b63a3bc6e411d96b9233524733b SHA256 6cb8cf0e1418cad035a243c08dfeee2e9395397dda74ada49667b3eba63bb76c -EBUILD python-2.6.5-r3.ebuild 9450 RMD160 64cd37f7296af9c69915254ac7e7486ce44714cf SHA1 717dc9c16923bebb685f327b28f4c19113f84165 SHA256 ebb844b223bfcace9feabeb2e6c23844b06b234f4148b659ef3f83453826b0b8 diff --git a/dev-lang/python/files/pydoc.conf b/dev-lang/python/files/pydoc.conf deleted file mode 100644 index 4a98fd4..0000000 --- a/dev-lang/python/files/pydoc.conf +++ /dev/null @@ -1,8 +0,0 @@ -# /etc/init.d/pydoc.conf -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.conf,v 1.2 2008/06/30 15:10:28 hawking Exp $ - -# This file contains the configuration information for pydoc's internal -# webserver. The variables should be rather self explanatory :-) - -# Default port for Python's pydoc server -PYDOC_PORT=7464 diff --git a/dev-lang/python/files/pydoc.init b/dev-lang/python/files/pydoc.init deleted file mode 100755 index 19b63e3..0000000 --- a/dev-lang/python/files/pydoc.init +++ /dev/null @@ -1,26 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2008 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public Licence v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.init,v 1.2 2008/06/30 15:10:28 hawking Exp $ - -depend() { - need net -} - -start() { - if [ -z $PYDOC_PORT ] ; then - eerror "Port not set" - return 1 - fi - ebegin "Starting pydoc server on port $PYDOC_PORT" - start-stop-daemon --start --background --make-pidfile \ - --pidfile /var/run/pydoc.pid \ - --startas /usr/bin/pydoc -- -p $PYDOC_PORT - eend $? -} - -stop() { - ebegin "Stopping pydoc server" - start-stop-daemon --stop --quiet --pidfile /var/run/pydoc.pid - eend $? -} diff --git a/dev-lang/python/python-2.6.5-r3.ebuild b/dev-lang/python/python-2.6.5-r3.ebuild deleted file mode 100644 index da7984b..0000000 --- a/dev-lang/python/python-2.6.5-r3.ebuild +++ /dev/null @@ -1,311 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/Attic/python-2.6.5-r3.ebuild,v 1.11 2010/12/06 02:56:40 jmbsvicetto Exp $ - -EAPI="2" - -inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs - -MY_P="Python-${PV}" - -PATCHSET_REVISION="5" - -DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language." -HOMEPAGE="http://www.python.org/" -SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2 - mirror://gentoo/python-gentoo-patches-${PV}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2" - -LICENSE="PSF-2.2" -SLOT="2.6" -PYTHON_ABI="${SLOT}" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" -IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" - -RDEPEND=">=app-admin/eselect-python-20091230 - >=sys-libs/zlib-1.1.3 - virtual/libffi - virtual/libintl - !build? ( - berkdb? ( || ( - sys-libs/db:4.7 - sys-libs/db:4.6 - sys-libs/db:4.5 - sys-libs/db:4.4 - sys-libs/db:4.3 - sys-libs/db:4.2 - ) ) - gdbm? ( sys-libs/gdbm ) - ncurses? ( - >=sys-libs/ncurses-5.2 - readline? ( >=sys-libs/readline-4.1 ) - ) - sqlite? ( >=dev-db/sqlite-3 ) - ssl? ( dev-libs/openssl ) - tk? ( >=dev-lang/tk-8.0 ) - xml? ( >=dev-libs/expat-2 ) - ) - doc? ( dev-python/python-docs:${SLOT} )" -DEPEND="${RDEPEND} - dev-util/pkgconfig - !sys-devel/gcc[libffi]" -RDEPEND+=" !build? ( app-misc/mime-types )" -PDEPEND="app-admin/python-updater" - -PROVIDE="virtual/python" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - python_pkg_setup - - if use berkdb; then - ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python. It has" - ewarn "been additionally removed in Python 3. You should use external, still maintained \"bsddb3\"" - ewarn "module provided by dev-python/bsddb3 which supports both Python 2 and Python 3." - fi -} - -src_prepare() { - # Ensure that internal copies of expat, libffi and zlib are not used. - rm -fr Modules/expat - rm -fr Modules/_ctypes/libffi* - rm -fr Modules/zlib - - if ! tc-is-cross-compiler; then - rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch - fi - - EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" - - # Avoid regeneration, which would not change contents of files. - touch Include/Python-ast.h Python/Python-ast.c - - sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ - Lib/distutils/command/install.py \ - Lib/distutils/sysconfig.py \ - Lib/site.py \ - Makefile.pre.in \ - Modules/Setup.dist \ - Modules/getpath.c \ - setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - - # Fix os.utime() on hppa. utimes it not supported but unfortunately reported as working - gmsoft (22 May 04) - # PLEASE LEAVE THIS FIX FOR NEXT VERSIONS AS IT'S A CRITICAL FIX !!! - [[ "${ARCH}" == "hppa" ]] && sed -e "s/utimes //" -i "${S}/configure" - - if ! use wininst; then - # Remove Microsoft Windows executables. - rm Lib/distutils/command/wininst-*.exe - fi - - # Fix OtherFileTests.testStdin() not to assume - # that stdin is a tty for bug #248081. - sed -e "s:'osf1V5':'osf1V5' and sys.stdin.isatty():" -i Lib/test/test_file.py || die "sed failed" - - eautoreconf -} - -src_configure() { - # Disable extraneous modules with extra dependencies. - if use build; then - export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" - export PYTHON_DISABLE_SSL="1" - else - # dbm module can be linked against berkdb or gdbm. - # Defaults to gdbm when both are enabled, #204343. - local disable - use berkdb || use gdbm || disable+=" dbm" - use berkdb || disable+=" _bsddb" - use gdbm || disable+=" gdbm" - use ncurses || disable+=" _curses _curses_panel" - use readline || disable+=" readline" - use sqlite || disable+=" _sqlite3" - use ssl || export PYTHON_DISABLE_SSL="1" - use tk || disable+=" _tkinter" - use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. - export PYTHON_DISABLE_MODULES="${disable}" - - if ! use xml; then - ewarn "You have configured Python without XML support." - ewarn "This is NOT a recommended configuration as you" - ewarn "may face problems parsing any XML documents." - fi - fi - - if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then - einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" - fi - - if [[ "$(gcc-major-version)" -ge 4 ]]; then - append-flags -fwrapv - fi - - filter-flags -malign-double - - [[ "${ARCH}" == "alpha" ]] && append-flags -fPIC - - # https://bugs.gentoo.org/show_bug.cgi?id=50309 - if is-flagq -O3; then - is-flagq -fstack-protector-all && replace-flags -O3 -O2 - use hardened && replace-flags -O3 -O2 - fi - - if tc-is-cross-compiler; then - OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ - ./configure --{build,host}=${CBUILD} || die "cross-configure failed" - emake python Parser/pgen || die "cross-make failed" - mv python hostpython - mv Parser/pgen Parser/hostpgen - make distclean - sed -i \ - -e "/^HOSTPYTHON/s:=.*:=./hostpython:" \ - -e "/^HOSTPGEN/s:=.*:=./Parser/hostpgen:" \ - Makefile.pre.in || die "sed failed" - fi - - # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. - tc-export CXX - - # Set LDFLAGS so we link modules with -lpython2.6 correctly. - # Needed on FreeBSD unless Python 2.6 is already installed. - # Please query BSD team before removing this! - append-ldflags "-L." - - OPT="" econf \ - --with-fpectl \ - --enable-shared \ - $(use_enable ipv6) \ - $(use_with threads) \ - $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ - --infodir='${prefix}/share/info' \ - --mandir='${prefix}/share/man' \ - --with-libc="" \ - --with-system-ffi -} - -src_test() { - # Tests will not work when cross compiling. - if tc-is-cross-compiler; then - elog "Disabling tests due to crosscompiling." - return - fi - - # Byte compiling should be enabled here. - # Otherwise test_import fails. - python_enable_pyc - - # Skip failing tests. - local skip_tests="distutils httpservers minidom pyexpat sax tcl" - - # test_ctypes fails with PAX kernel (bug #234498). - host-is-pax && skip_tests+=" ctypes" - - for test in ${skip_tests}; do - mv "${S}/Lib/test/test_${test}.py" "${T}" - done - - # Rerun failed tests in verbose mode (regrtest -w). - EXTRATESTOPTS="-w" emake test - local result="$?" - - for test in ${skip_tests}; do - mv "${T}/test_${test}.py" "${S}/Lib/test/test_${test}.py" - done - - elog "The following tests have been skipped:" - for test in ${skip_tests}; do - elog "test_${test}.py" - done - - elog "If you would like to run them, you may:" - elog "cd '${EPREFIX}$(python_get_libdir)/test'" - elog "and run the tests separately." - - python_disable_pyc - - if [[ "${result}" -ne 0 ]]; then - die "emake test failed" - fi -} - -src_install() { - [[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/" - - emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" - python_clean_installation_image -q - - mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}" - - # Fix collisions between different slots of Python. - mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" - mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" - mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" - mv "${ED}usr/share/man/man1/python.1" "${ED}usr/share/man/man1/python${SLOT}.1" - rm -f "${ED}usr/bin/smtpd.py" - - if use build; then - rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{bsddb,idlelib,lib-tk,sqlite3,test} - else - use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/"{bsddb/test,test} - use berkdb || rm -fr "${ED}$(python_get_libdir)/"{bsddb,test/test_bsddb*} - use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} - use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,lib-tk} - fi - - use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing" - - prep_ml_includes $(python_get_includedir) - - dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" - - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r "${S}/Tools" || die "doins failed" - fi - - newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed" - newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed" - - # Do not install empty directory. - rmdir "${ED}$(python_get_libdir)/lib-old" -} - -pkg_preinst() { - if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.6" && ! has_version "${CATEGORY}/${PN}:2.7"; then - python_updater_warning="1" - fi -} - -eselect_python_update() { - local eselect_python_options - [[ "$(eselect python show)" == "python2."* ]] && eselect_python_options="--python2" - - # Create python2 symlink. - eselect python update --python2 > /dev/null - - eselect python update ${eselect_python_options} -} - -pkg_postinst() { - eselect_python_update - - python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir) - - if [[ "${python_updater_warning}" == "1" ]]; then - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn - ewarn "You have just upgraded from an older version of Python." - ewarn "You should run 'python-updater \${options}' to rebuild Python modules." - ewarn - ewarn "\e[1;31m************************************************************************\e[0m" - ewarn - ebeep 12 - fi -} - -pkg_postrm() { - eselect_python_update - - python_mod_cleanup $(python_get_libdir) -} From 0d873a1f0fe6099b781a10b87a4d7cf9a0179030 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Tue, 28 Mar 2017 16:15:46 -0600 Subject: [PATCH 7/9] libressl de Portage --- dev-libs/libressl/libressl-2.5.2.ebuild | 52 +++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 dev-libs/libressl/libressl-2.5.2.ebuild diff --git a/dev-libs/libressl/libressl-2.5.2.ebuild b/dev-libs/libressl/libressl-2.5.2.ebuild new file mode 100644 index 0000000..320352a --- /dev/null +++ b/dev-libs/libressl/libressl-2.5.2.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils multilib-minimal + +DESCRIPTION="Free version of the SSL/TLS protocol forked from OpenSSL" +HOMEPAGE="http://www.libressl.org/" +SRC_URI="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${P}.tar.gz" + +LICENSE="ISC openssl" +# Reflects ABI of libcrypto.so and libssl.so. Since these can differ, +# we'll try to use the max of either. However, if either change between +# versions, we have to change the subslot to trigger rebuild of consumers. +SLOT="0/43" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86" +IUSE="+asm static-libs" + +RDEPEND="!dev-libs/openssl:0" +DEPEND="${RDEPEND}" +PDEPEND="app-misc/ca-certificates" + +src_prepare() { + touch crypto/Makefile.in + + sed -i \ + -e '/^[ \t]*CFLAGS=/s#-g ##' \ + -e '/^[ \t]*CFLAGS=/s#-g"#"#' \ + -e '/^[ \t]*CFLAGS=/s#-O2 ##' \ + -e '/^[ \t]*CFLAGS=/s#-O2"#"#' \ + -e '/^[ \t]*USER_CFLAGS=/s#-O2 ##' \ + -e '/^[ \t]*USER_CFLAGS=/s#-O2"#"#' \ + configure || die "fixing CFLAGS failed" + + eapply_user +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf \ + $(use_enable asm) \ + $(use_enable static-libs static) +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files +} From 187451bd576854840a4120be23336e8184f3f923 Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Tue, 28 Mar 2017 16:21:17 -0600 Subject: [PATCH 8/9] =?UTF-8?q?Actualizaci=C3=B3n=20de=20libressl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev-libs/libressl/Manifest | 2 ++ .../{libressl-2.5.2.ebuild => libressl-2.5.2-r100.ebuild} | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) rename dev-libs/libressl/{libressl-2.5.2.ebuild => libressl-2.5.2-r100.ebuild} (96%) diff --git a/dev-libs/libressl/Manifest b/dev-libs/libressl/Manifest index bee68c4..8400d4b 100644 --- a/dev-libs/libressl/Manifest +++ b/dev-libs/libressl/Manifest @@ -3,7 +3,9 @@ DIST libressl-2.2.5.tar.gz 2966527 SHA256 e3caded0469d8dc64f4ca2fe8e499ada4dd014 DIST libressl-2.2.6.tar.gz 2965531 SHA256 1ee19994cffd047d40f63ba149115dba18a681b0cc923beec301bf424b58d64f SHA512 41e29431ad9e8b18e2dbc30fe9df1d7be3ca372d5d7757b5b01f8904515bafd5333446957fbc9874f64f384dae56cf6bf29d6808a7c0df1836b55ea64804a4bf WHIRLPOOL 49b6efa211ea4789e51388d3ebfec941dfedad427b806b33d439a7639e09d16e5c9004edc4a4c8e3de63040ebc2fe0a3a3819c68ed674e3bb36bb52b49e75ce5 DIST libressl-2.5.0.tar.gz 3012855 SHA256 8652bf6b55ab51fb37b686a3f604a2643e0e8fde2c56e6a936027d12afda6eae SHA512 6372b27f1696e957389646a05b0572ad6936443b34fee0e57153b063831e00318fa1b434e3e0369f0c3df872e15ad3bee2f85db0851021444612f2a6f266a332 WHIRLPOOL 9b145915734a1914f0d36df04a8b35aa2ce2c91f7d6b3a978c5c6845314c56c61718fce6c471ba1a03f3d1ff052246c3db767adee99bc3d38a6bd692b9086ad0 DIST libressl-2.5.1.tar.gz 3266271 SHA256 f71ae0a824b78fb1a47ffa23c9c26e9d96c5c9b29234eacedce6b4c7740287cd SHA512 44557c7c3e6bc9c0af9ae83b26765be9707d53708a32a5a945108a49ea20503afa4197919801830d27821c069b87e0e0edd284bd1b8a85340dbc0da2c162c2f9 WHIRLPOOL e31b487e9e88f372cd22db05e54e74900181120cf8c6105f5531658e7b467722680921f3630b8943ee0ec5f5777cb76a7ddc64e4d43f166903928aaa4f98509c +DIST libressl-2.5.2.tar.gz 3277320 SHA256 0ffa7d70809284a4ac96e965918a61c1d7930bca865457a7db0ff0afc8201c82 SHA512 2c42b8bab40dfb517231d83456073c92a61210a83654f23bec1b5148bd7e3c0590f50244970ebf966e5e9582ea98289fe48c6f246d1d79e5d9facea2041e4faa WHIRLPOOL fc1dba52049779bf55a39a88abff8db8cfa3ba0d437dfacefa372d64e9859d7904848ba146a54064f70b79d0febea666757981ff4268699ac22a6cd8b5f3bc73 EBUILD libressl-2.2.5.ebuild 1054 SHA256 142e8949dd994b073f5534eec5179e0279b0355db8d19706ae79fec884fd8e50 SHA512 857a5a4f515b0d3da119afbe887904f22d4dc4604c6a79356babe7153780fd1891f8a2669a60fc6a21306b87489f49da5b9b025c9b7bfd7c77769f375c02999a WHIRLPOOL 045e3fc06a6756d388ac812275e7d356882ef060dca81ec842b843015169e16d21321135e3b16e56ffe61964d625fb3df279013dbecb865a8d3c54d8b47fc723 EBUILD libressl-2.2.6.ebuild 1054 SHA256 3fab9e63f6de19c5b8f72004eb07683bf4f6258ca6ba4e894d8bfdd7bda4ca7d SHA512 5c0b1cc0cec3b2377ecaef9656abdff5423d4ec3382c40efd1755af7aa381c9ff776d163d66bbd02e0f5aae7d77817d9bbb5add36b3d7bc79f1f8ab8fa8760f5 WHIRLPOOL ff305eb21f44a422b921164114d115b8f8942b79b78316181423a2bee71ac9f93a8308c777722f1fe0af0661649dfa7b8d3e357f98073a80783a64a3a97f5ccf EBUILD libressl-2.5.0-r1.ebuild 1229 SHA256 3012d42d7b9f4294825c234106177dfa5c8e323b9e95adcae870d37d6cfd6a7a SHA512 7f52efcd5891c2b758b595ba3985114bc3ee994de190a1a8fbf6cf2022c4cc45f4b40a3ef0e5b23ca16c17b47600b23e146348016b0c1a8f6b8b4733feb5614a WHIRLPOOL f6ddc4a0cef44805b5fbf7d90d338b9a7f622297edc7bb522ed46b521234799fd1b64390cd937ef0a87259f5d91d6190172a8b5eb809373895d4bc73dcb52909 EBUILD libressl-2.5.1-r100.ebuild 1243 SHA256 f866bdbf7e3d93c54be85ff3aa34daa53e9aeacf0603d7a3097fe9b85f3c98cb SHA512 8c589126549842d807aeed4800f036097011556ef6615d02b3703f0335247322c52f7115b1d1efde900e291f4df4fe4beabf396b4d45b7841c34911aacc9f8e4 WHIRLPOOL ad33df3b7360c9d149af41c5377709e7f2d2de6994d839c1ee0ab708477ee4433fce3c0bec479e91a3f1fed3d194bd28b0df3f7dd5d3cea383828a21a997088a +EBUILD libressl-2.5.2-r100.ebuild 1243 SHA256 f866bdbf7e3d93c54be85ff3aa34daa53e9aeacf0603d7a3097fe9b85f3c98cb SHA512 8c589126549842d807aeed4800f036097011556ef6615d02b3703f0335247322c52f7115b1d1efde900e291f4df4fe4beabf396b4d45b7841c34911aacc9f8e4 WHIRLPOOL ad33df3b7360c9d149af41c5377709e7f2d2de6994d839c1ee0ab708477ee4433fce3c0bec479e91a3f1fed3d194bd28b0df3f7dd5d3cea383828a21a997088a diff --git a/dev-libs/libressl/libressl-2.5.2.ebuild b/dev-libs/libressl/libressl-2.5.2-r100.ebuild similarity index 96% rename from dev-libs/libressl/libressl-2.5.2.ebuild rename to dev-libs/libressl/libressl-2.5.2-r100.ebuild index 320352a..b8f44ca 100644 --- a/dev-libs/libressl/libressl-2.5.2.ebuild +++ b/dev-libs/libressl/libressl-2.5.2-r100.ebuild @@ -17,8 +17,6 @@ SLOT="0/43" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86" IUSE="+asm static-libs" -RDEPEND="!dev-libs/openssl:0" -DEPEND="${RDEPEND}" PDEPEND="app-misc/ca-certificates" src_prepare() { From 8f3b8401eb30813d6cebd834ddbbd3df9e5441cb Mon Sep 17 00:00:00 2001 From: Sandino Araico Sanchez Date: Tue, 28 Mar 2017 16:22:52 -0600 Subject: [PATCH 9/9] ebuild del Darwin Streaming Server. Compila pero no corre. --- media-video/darwin-streaming-server/Manifest | 8 ++++++++ .../darwin-streaming-server-6.0.3.ebuild | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 media-video/darwin-streaming-server/Manifest diff --git a/media-video/darwin-streaming-server/Manifest b/media-video/darwin-streaming-server/Manifest new file mode 100644 index 0000000..ea4db88 --- /dev/null +++ b/media-video/darwin-streaming-server/Manifest @@ -0,0 +1,8 @@ +AUX darwin-streaming-server-6.0.3-gentoo.patch 13111 SHA256 a6d1ce2bd2104b323146b36ccf993cc704f8b430dc05e050e4c885b7e5d90a1b SHA512 12f6ed25fea87258ecf526eb62499ba3db82a9b287f3fd754767a251b812ed86132bfb9a31e790c97036b10956e8369698b3baedf1b6f24757c1a423a7a5e11a WHIRLPOOL afb27a37b752e9f97019586c75d6bf641b41728602d6b6e71f006e28bb7aafd604c3508ab9c82d52aa0c8d1427b3556bdfebdd36786b3595243e22eba1755646 +AUX darwin-streaming-server-6.0.3-linux.patch 15014 SHA256 13741e14f704d3b0db00100c9213ff0bec104403622905e92f370d846bf8f2ea SHA512 299e330fd39a263ffebb573b9c5c8b264b203ba9cab108d074f34234491f25d84a929c3bfee045655abdb2564ea8201c0abebbdc36d5ee70399b3684a8c23f50 WHIRLPOOL 530594f6bb637adada9ee7e418bfdffc0c29a6861885c1fedc4f4a68e634388e2133794812af5e4a500ffb6e8267f6d2c7a4b2abc1ff7bab7c4967e1f958206a +AUX darwin-streaming-server-6.0.3-ppc64.patch 1841 SHA256 bc014c9ad7c359c2a9701f8953a36b3f30095c211138009462cc54febe4494d9 SHA512 bb1f33fff0f69d8d4d3b6d6ea31d43ad44ff29ddc876225f48e655a284a279b478d3f24fc3b540b1445efb0e3ca86bf9c41e9215b9e1d0b4aab6a69221055d0f WHIRLPOOL d168549a24b1451f42260022bdcde9986d667194c208f228e1b5004d89b835cbf342a61b18389c0f30d869d38793d0165146572f02eab074634f55100e35a5f2 +AUX darwin-streaming-server-6.0.3-x86_64-m32.patch 561 SHA256 91587215f9e5d040003af94a27bd85c553ccd62c4c2c650182ec5beecf35449e SHA512 63509e0330e39689e2a43a3412bb7429c920da166c483cfe0af7f648159d3a2579dfdb701e658063a1acda57a185e375ce1fde63dd5fe38dfaf8f0b1191b9448 WHIRLPOOL 58e901dcb6581818ced069cdc0f6151a48636653013e158607220eb779fc7103762680ad86a596c758cdaf7624665cf49700bbf1794b8d8cc80aa5e44796eb1b +AUX darwin-streaming-server-6.0.3-x86_64.patch 173414 SHA256 e328e21c4b49075d7ac8bdd0d1227f68f3a6812ecd7eeef27064effdf095609e SHA512 1506acdaa97c044e89015a8762ebe4d970a61d39246d396b0ab769b98a5de426d0278eb4d6e5d1c6484fe16f14c64f578737199fee528546ea1ea03215fe6276 WHIRLPOOL 7d415c9cfe1ccac10a00a86e59716b216968cf168685a76278b6e730c95d1efc976f98e6a829127da584457714d0e64c7735a64d8afbde08efb2a68a988bdd57 +AUX dss.rc 598 SHA256 5743205e13a3682f1aebf9c95bb95c74d68fc4b752b7517bd56ddfa6e0f36003 SHA512 91a65b1ecabb14f081e32c591736eb8d1651c1c4b68859c92ad6afa70639d3fdf2153521f1817b13505812cd07e5d11e19a4ddcd9a21fc761259b456276745bf WHIRLPOOL 65b3780e9ba1f5fa2e3a65a500e0f82c7782bc1caed24df41b233ece183ada58eb75f4035a156be601db7a6a342656bb0ca95c156696cab393832b8ce652b514 +DIST DarwinStreamingSrvr6.0.3-Source.tar 32593920 SHA256 7bf75ced3f603f55c6f7601bfecd9f26393ea98be821d24169f2091843706522 SHA512 f507c8e01ca6f81e1d00a85fb137486d026817015178593c2a5de1dde34f809bc48b1348ea661a94ee0913811d23d0c204d28c29af0c1c9d69bd31eeefd9af85 WHIRLPOOL 74872c9582d4b9c54fad4cec1be6cee4b7cf18f3b8cb92d8b027dfee1ec4a48fdfefddfeda4f2fb5b95e1af291a0c87f4743c4753a4361c408f0b4fe858dcc99 +EBUILD darwin-streaming-server-6.0.3.ebuild 4494 SHA256 8654bb6d3c5856f361675663c234bf14eefd26dd2608567038c41c10517a5482 SHA512 88ea5be53b77efe1883263b0223e5d0340dd72dc0d323ef3374ee9e551cf91bf79f67aa1920aaf2bc9bc969b662439142497cd0468be23283e41d5bdf75c9053 WHIRLPOOL c51a8c1108e8aa4fbe0c0f00e615f451c2d7f381a7b8cacc4aca6c4139de79e697eac647f251bb00fc5b52aa83e51037014bbb7a75b2ee6bcfd3d17e83b4c2e5 diff --git a/media-video/darwin-streaming-server/darwin-streaming-server-6.0.3.ebuild b/media-video/darwin-streaming-server/darwin-streaming-server-6.0.3.ebuild index 99d3250..e7a462e 100644 --- a/media-video/darwin-streaming-server/darwin-streaming-server-6.0.3.ebuild +++ b/media-video/darwin-streaming-server/darwin-streaming-server-6.0.3.ebuild @@ -2,6 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: darwin-streaming-server-6.0.3.ebuild 2008-06-05 bpkroth $ +EAPI=2 + inherit eutils MY_P="DarwinStreamingSrvr${PV}-Source"