Update to icecat 3.5.2, based on www/firefox 3.5.2.

This commit is contained in:
Yorick Hardy 2009-09-11 14:01:18 +00:00 committed by Thomas Klausner
parent 79a58f233c
commit 85827db532
56 changed files with 5151 additions and 2743 deletions

View file

@ -1,74 +1,69 @@
# $NetBSD: Makefile,v 1.8 2009/06/23 21:19:39 yhardy Exp $
# $NetBSD: Makefile,v 1.9 2009/09/11 14:01:18 yhardy Exp $
#
MOZILLA= icecat
MOZILLA_BIN= icecat-bin
COMMENT= Lightweight gecko-based web browser
DISTNAME= icecat-${ICECAT_VER}
ICECAT_VER= 3.5.2
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_GNU:=gnuzilla/${ICECAT_VER}/}
#MASTER_SITES= http://ftp.gnu.org/gnu/gnuzilla/${ICECAT_VER}-g1/
#MASTER_SITES+= http://www.gnu.org/software/gnuzilla/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= tnn@NetBSD.org
HOMEPAGE= http://www.gnu.org/software/gnuzilla/
COMMENT= GNU version of www/firefox
WRKSRC= ${WRKDIR}/${DISTNAME}
GNU_CONFIGURE= yes
USE_TOOLS+= pkg-config perl gmake autoconf213
USE_LANGUAGES= c c++
BUILD_DEPENDS+= zip>=2.3:../../archivers/zip
PKG_DESTDIR_SUPPORT= user-destdir
MOZILLA_USE_GTK2= # yes
MOZILLA_USE_XFT= YES
INSTALLATION_DIRS= lib/pkgconfig share/applications share/pixmaps
CHECK_PORTABILITY_SKIP= security/nss/tests/libpkix/libpkix.sh
BUILDLINK_API_DEPENDS.cairo+= cairo>=1.6.4
PRIVILEGED_STAGES= clean
# Pull in standard firefox build framework, and override some things below.
# This include must appear first, to ensure that USE_LANGUAGES is set
# correctly before mk/compiler.mk may be loaded.
.include "../../www/firefox/Makefile-firefox.common"
CONFIG_GUESS_OVERRIDE= build/autoconf/config.guess
CONFIG_GUESS_OVERRIDE+= js/src/build/autoconf/config.guess
CONFIG_GUESS_OVERRIDE+= nsprpub/build/autoconf/config.guess
CONFIG_SUB_OVERRIDE= build/autoconf/config.sub
CONFIG_SUB_OVERRIDE+= js/src/build/autoconf/config.sub
CONFIG_SUB_OVERRIDE+= nsprpub/build/autoconf/config.sub
MAINTAINER= pkgsrc-users@NetBSD.org
MOZ_VER= 3.0.11
MOZILLA_BIN= icecat-bin
CONFIGURE_ARGS+= --enable-application=browser
CONFIGURE_ARGS+= --enable-libxul
CONFIGURE_ARGS+= --disable-tests --disable-pedantic
CONFIGURE_ARGS+= --enable-crypto
CONFIGURE_ARGS+= --enable-optimize=-O2 --with-pthreads
CONFIGURE_ARGS+= --disable-gnomeui --disable-javaxpcom
CONFIGURE_ARGS+= --disable-dbus --disable-javaxpcom
CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk2
CONFIGURE_ARGS+= --enable-svg --enable-mathml
CONFIGURE_ARGS+= --enable-system-cairo --enable-system-lcms
CONFIGURE_ARGS+= --with-system-jpeg
CONFIGURE_ARGS+= --with-system-zlib --with-system-bz2
CONFIGURE_ARGS+= --enable-system-sqlite
CONFIGURE_ARGS+= --disable-crashreporter
DISTNAME= icecat-${MOZ_VER}-g1
MASTER_SITES= http://ftp.gnu.org/gnu/gnuzilla/${MOZ_VER}-g1/
MASTER_SITES+= http://www.gnu.org/software/gnuzilla/
EXTRACT_SUFX= .tar.bz2
HOMEPAGE= http://www.gnu.org/software/gnuzilla/
WRKSRC= ${WRKDIR}/${DISTNAME}
ALL_ENV+= MOZILLA_PKG_NAME=icecat
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
PYTHON_FOR_BUILD_ONLY= yes
.include "../../lang/python/application.mk"
CONFIGURE_ENV+= PYTHON=${PYTHONBIN:Q}
XPTCFILES:= ${XPTCFILES:C,^,../../firefox3/files/,}
DESCR_SRC= ${.CURDIR}/../../wip/icecat/DESCR
DISTINFO_FILE= ${.CURDIR}/../../wip/icecat/distinfo
PATCHDIR= ${.CURDIR}/../../www/firefox3/patches
.include "options.mk"
.include "../../mk/bsd.prefs.mk"
CONFLICTS= firefox3
MOZILLA= icecat
MOZILLA_NAME= IceCat 3
MOZILLA_ICON= ${WRKSRC}/browser/branding/unofficial/content/default.png
#PLIST_SUBST+= MOZILLA=${MOZILLA:Q}
#PLIST_SUBST+= MOZILLA_BIN=${MOZILLA_BIN:Q}
#FILES_SUBST+= MOZILLA=${MOZILLA:Q}
#FILES_SUBST+= MOZILLA_BIN=${MOZILLA_BIN:Q}
.PHONY: copy-pkgconfig
post-extract: copy-pkgconfig
copy-pkgconfig:
cp ${.CURDIR}/../../wip/icecat/files/*.pc ${WRKSRC:Q}/build/unix
SUBST_CLASSES+= fix-pc
SUBST_STAGE.fix-pc= pre-configure
SUBST_MESSAGE.fix-pc= Substituting prefix in pkg-config files.
SUBST_FILES.fix-pc+= build/unix/*.pc
SUBST_SED.fix-pc= -e 's,@PREFIX@,${PREFIX},g'
# We don't have libxcb yet
SUBST_CLASSES+= no-xcb
SUBST_STAGE.no-xcb= pre-patch
SUBST_MESSAGE.no-xcb= Removing dependency on libxcb.
SUBST_FILES.no-xcb+= configure.in
SUBST_SED.no-xcb= -e 's,PKG_CHECK_MODULES(XCB,\#PKG_CHECK_MODULES(XCB,g'
# Need this to be able to reuse existing firefox pkgsrc infrastructure
.PHONY: create-dummy-c-sdk
pre-configure: create-dummy-c-sdk
create-dummy-c-sdk:
mkdir -p ${WRKSRC:Q}/directory/c-sdk
touch ${WRKSRC:Q}/directory/c-sdk/configure.in
pre-configure:
cd ${WRKSRC} && autoconf
cd ${WRKSRC}/js/src && autoconf
cd ${WRKSRC}/nsprpub && autoconf
# Makefiles sometimes call "rm -f" without more arguments. Kludge around ...
.PHONY: create-rm-wrapper
@ -78,69 +73,30 @@ create-rm-wrapper:
${WRAPPER_DIR}/bin/rm
chmod +x ${WRAPPER_DIR}/bin/rm
# Link browser.xpt
.PHONY: stage-package
post-build: stage-package
stage-package:
cd ${WRKSRC}/browser/installer && \
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} stage-package
cp ${WRKSRC}/dist/icecat/components/browser.xpt \
${WRKSRC}/dist/bin/components/browser.xpt
.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
PLIST_SUBST+= JEMALLOC=
SCRIPTS_ENV+= JEMALLOC=
.PHONY: install-libjemalloc
post-install: install-libjemalloc
install-libjemalloc:
${INSTALL_LIB} ${WRKSRC}/dist/lib/libjemalloc.${SO_SUFFIX} \
${DESTDIR}${PREFIX}/lib/${MOZILLA}/libjemalloc.${SO_SUFFIX}
.else
PLIST_SUBST+= JEMALLOC="@comment "
SCRIPTS_ENV+= JEMALLOC="@comment "
.endif
MOZILLA_NAME= IceCat 3
MOZILLA_ICON= ${WRKSRC}/browser/branding/unofficial/content/default.png
.PHONY: preinstall-icon
pre-install: preinstall-icon
preinstall-icon:
${INSTALL_DATA_DIR} ${WRKSRC}/dist/bin/chrome/icons/default
${INSTALL_DATA} ${MOZILLA_ICON} \
${WRKSRC}/dist/bin/chrome/icons/default/default.png
.PHONY: install-desktop
post-install: install-desktop
install-desktop:
${SED} \
-e 's|@MOZILLA@|${MOZILLA}|g' \
-e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|g' \
-e 's|@FIREFOX_ICON@|${MOZILLA}.png|g' \
<${.CURDIR}/../../www/firefox3/files/firefox3.desktop.in \
>${WRKDIR}/${MOZILLA}.desktop
${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop \
${DESTDIR}${PREFIX}/share/applications/${MOZILLA}.desktop
${INSTALL_DATA} ${MOZILLA_ICON} \
${DESTDIR}${PREFIX}/share/pixmaps/${MOZILLA}.png
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/applications
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/pixmaps
${SED} -e 's|@MOZILLA@|${MOZILLA}|g' \
-e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|g' \
-e 's|@ICECAT_ICON@|${MOZILLA}.png|g' \
< ${FILESDIR}/desktop.in \
> ${WRKDIR}/desktop
${INSTALL_DATA} ${WRKDIR}/desktop \
${DESTDIR}${PREFIX}/share/applications/${MOZILLA}.desktop
${INSTALL_DATA} ${MOZILLA_ICON} \
${DESTDIR}${PREFIX}/share/pixmaps/${MOZILLA}.png
INSTALLATION_DIRS+= lib/${MOZILLA}/modules
# configure says: "Can't use system PNG because it doesn't have APNG support"
CONFIGURE_ARGS+= --without-system-png
# Override www/firefox's idea of toolkit
CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk2
# Is dbus support useful for anything?
CONFIGURE_ARGS+= --disable-dbus
# Avoids needing curl on Linux
CONFIGURE_ARGS+= --disable-crashreporter
PYTHON_FOR_BUILD_ONLY= yes
.include "../../lang/python/application.mk"
CONFIGURE_ENV+= PYTHON=${PYTHONBIN:Q}
CONFIGURE_ARGS+= --enable-system-sqlite
BUILDLINK_API_DEPENDS.sqlite3+= sqlite3>=3.5.9
.if ${OPSYS} == "Linux"
.include "../../audio/alsa-lib/buildlink3.mk"
.endif
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/lcms/buildlink3.mk"
.include "../../net/libIDL/buildlink3.mk"
.include "../../x11/gtk2/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/bsd.pkg.mk"

File diff suppressed because it is too large Load diff

View file

@ -1,51 +1,56 @@
$NetBSD: distinfo,v 1.8 2009/06/23 21:19:40 yhardy Exp $
$NetBSD: distinfo,v 1.9 2009/09/11 14:01:19 yhardy Exp $
SHA1 (icecat-3.0.11-g1.tar.bz2) = 60d24d6e79d62f9de7068ab7aeea0b04cef6c9be
RMD160 (icecat-3.0.11-g1.tar.bz2) = e711b59cf9833b1e73af9cf6fac91090eb45f5fe
Size (icecat-3.0.11-g1.tar.bz2) = 33922710 bytes
SHA1 (patch-aa) = f995b5e53fa11ecb659ab2dd10551db1c71cc5f3
SHA1 (patch-ab) = 4a1704e96b74c76adca615fdf2c9069ca17e9d70
SHA1 (patch-ac) = af80f061bdd918a61197c9c499e7d1f5b7d10ebd
SHA1 (patch-ad) = 20f2184a7e5e98b065e884c67e4c17fc52019a79
SHA1 (patch-ae) = fea251aabc772c3d4ad3044c8295af45cc9cab2d
SHA1 (patch-ap) = 552694ac2d6ca713aec98ec394f1215c048c2392
SHA1 (patch-ax) = cbfe7a6392d5d2fefff123679ba1c056b1cc0aa9
SHA1 (patch-ba) = 3bd713cf2edcc61f489cea8269ca60e27c26f1d9
SHA1 (patch-bb) = c7286542a9fe97ac9819a00c345272efb7e90e9c
SHA1 (patch-bm) = a0a69ca516e8a569d5e61293d5610b236192bf85
SHA1 (patch-bo) = 6e06648e1ea9320349f3b2a524055b513ca74358
SHA1 (patch-bq) = 2b29436d138fea4e1941d537be1a636969db9a77
SHA1 (patch-br) = 66940666497e82bfb39dcc9381ecd85942ab222c
SHA1 (patch-bs) = 79cb84a5ed67780e124e7c595ee4ae6ffc7617a6
SHA1 (patch-bu) = 0714f658001c363f4abbfb248ac77c4862e3ccf9
SHA1 (patch-bv) = ef06a6a774c9d4da7b3fbf6f4e274ab042926e49
SHA1 (patch-bx) = 498f1c06acc670ba6dc9095ba2ce0d14ccad600c
SHA1 (patch-bz) = f2f6cf120133b23d1d3f182bce90b1b2fbf81142
SHA1 (patch-ca) = 7ff10fca5e11433b3016612417c6852db8607eb1
SHA1 (patch-cb) = d046b6eb23a96f75d339e7b7afbf0316f121d4d5
SHA1 (patch-de) = 18e481c3e69fe95b1af87bc800d93f47388fb60a
SHA1 (patch-df) = 17912d183f754ab6661d2be8092e6a07d142632b
SHA1 (patch-dh) = 7592a6238acd5ef6e802d32103c897acb576825a
SHA1 (patch-dj) = 70360dffb20dd1029866d2e81899d003c9e17473
SHA1 (patch-dk) = 0d676fbaf581fe3f513481010745278df6bf77ae
SHA1 (patch-dl) = cba07cba5717a75c89f007aba36295dccc1c25ab
SHA1 (patch-do) = bdb018e157dcb5ef706b69184d8b739cfd32d8c3
SHA1 (patch-dr) = 377b1d83079ada4d819b6702c1010cdd900575fc
SHA1 (patch-ds) = 1e2e371b9ff7ab9049a947d8e0a63483a1fd244e
SHA1 (patch-du) = c6e66bb420ce9ea988f89b57d1c20a247704cfcf
SHA1 (patch-dv) = a380d261d4c2771a672d2b0f4f1f23821e3e5266
SHA1 (patch-ea) = 30fee4794317da23a358f183718dae75501f5121
SHA1 (patch-eb) = 176f71af302b1067c301e9cffa2d13a5837e45fe
SHA1 (patch-ed) = 3c6281a75373843c5767fc1213d8cc67dc549e03
SHA1 (patch-ee) = d5aeca91305ed2e1f522b2c0ed4bb17f7f8b881b
SHA1 (patch-eh) = 60aca7f94ee04c957386014f7d4df9e3c8ac8ff1
SHA1 (patch-ei) = 4484d57e19e39ef86760716d5886ebf2a3e69f63
SHA1 (patch-ej) = 9b9c708483399fa89c6bf5bdc15e79b31793c89d
SHA1 (patch-ek) = b94debcf16ba6f0dccc0a812b5e5fa38a150c413
SHA1 (patch-el) = 8a1586e4ebb76f584dc7b1cbc19f0c389ea206f7
SHA1 (patch-em) = 6b8b470fc78a4a56400e77af1057b9266634dcc9
SHA1 (patch-en) = 39926ce5669119c358e8600e2d70d08236e67443
SHA1 (patch-eo) = 281ec932efe607eee4c020aad3851c2aa44dddd2
SHA1 (patch-wc) = 2de8665ed6c23c26566ca6d50165c0cf413a753d
SHA1 (patch-wd) = fc5c3103ae6f2a2eccc01911a8207f3ca614008b
SHA1 (patch-we) = f7fecce05454e9794ff7a4e7789031a5ef49c42d
SHA1 (icecat-3.5.2.tar.bz2) = 3153ceb58c520dc6844380c9e82fd7f6400e796c
RMD160 (icecat-3.5.2.tar.bz2) = 36da80745e43e4e8afdc7b0f1f0e3c4ac1bc6b7c
Size (icecat-3.5.2.tar.bz2) = 43511090 bytes
SHA1 (patch-aa) = 46406d9856e0ff1202300e8e76b15e244f652821
SHA1 (patch-ab) = 5331bae45501013d3ca13d161226e311bc10aafe
SHA1 (patch-ac) = 565d958699e19092bd139f6fbf2505e55b857560
SHA1 (patch-ad) = 7afb960af4e4a311481e7a7b25008ca9b9f7fba1
SHA1 (patch-ae) = 6679dd9c28f8029cc0ed2a32ae60da696099f351
SHA1 (patch-af) = 13a9617cd2894cf342487d2a9cfe8cf3066ba0df
SHA1 (patch-ag) = 62e55040130d5e6cfb10b839fce6abd40a902f08
SHA1 (patch-ah) = 5f8bf19d5ac5ea7e263366a56d10d2eeeee61bac
SHA1 (patch-ai) = 3444882b0f7f4b63273d8888af88be35ae60933a
SHA1 (patch-aj) = 0e357b477aef423e7688dfb0be93cc8abc35e6e0
SHA1 (patch-ak) = 635187f582c16f8f044ffbdd950ec5f996d53ca8
SHA1 (patch-al) = ca1a1fb5f875ab9c84c0afea5d913172a6f7ab57
SHA1 (patch-am) = 75eb92d1941309ffc13f01d7f1946a2f09170220
SHA1 (patch-an) = e975941955b578f1d3336d546e99f0c464cdd9d7
SHA1 (patch-ao) = af027520b0277838a5a5f4ad33e14174e6e8bc0c
SHA1 (patch-ap) = ec834a5d8c4cf5bf8fb5b8fc2b75cc4ba34f4b56
SHA1 (patch-aq) = ee2f7917fbf102ce6d20f1467702815b062f82e7
SHA1 (patch-ar) = bfeaa055b7192e5874427615424496b41410f24b
SHA1 (patch-as) = aa83f9b834d796982a2b580ed908e188a28c6a41
SHA1 (patch-at) = 97d407a7c3eae661d194e1c59d7d721843acf8c0
SHA1 (patch-au) = f27b6c8b2c744da388e1d15d0776929e7165ee76
SHA1 (patch-av) = 6ddcbbd3f0197fb88622fc32d6d0fd602ec4ad34
SHA1 (patch-ma) = a20b263ff14c841fd0ae1634962b90a41173b524
SHA1 (patch-mb) = 05298c1ec02363ff0bada87337cf0ccb5b42c55b
SHA1 (patch-md) = 6bf5242245b17fbd868a6a978eb5849726f81393
SHA1 (patch-me) = f5a8e29fc004ef7696b67d260384ab23fd1658c2
SHA1 (patch-mf) = 5b21ac89b7df196a65450320310c54f552446aff
SHA1 (patch-mg) = 75ddcceaffae0bdb6ecb4efd1b5ffca68a8ae8a8
SHA1 (patch-mi) = 787cb043bb7e687936afaf8f0c67b6b3a7b03e5b
SHA1 (patch-mj) = 197fab0e00256dedc8a5f181ee0d0d6e42d8177f
SHA1 (patch-mk) = 793dfa16e19e213d78995c893a28bc0d514135d9
SHA1 (patch-ml) = 9003af056e5b671b2345d0a75e99836746369c00
SHA1 (patch-mm) = faabab8816522bd9a74c2e6e65b2ae3d791affe0
SHA1 (patch-mn) = 17641f46ecf1019f3cc02583a22baa9f9a327d1f
SHA1 (patch-mp) = 33128f10b6146419bcebd85f7e6e7fa72e770be1
SHA1 (patch-na) = 10a09ddb5de67c3cc2f605c75de7ac2e30a92ae7
SHA1 (patch-nb) = 6b1719219df7cdd7bf5335fcf7f48567a37ffa87
SHA1 (patch-nc) = f2a3cc803a114702e856947c25fd79baa85b0e26
SHA1 (patch-xa) = ae5ed1f0fb9a0fd45242a94739853b199ed7da72
SHA1 (patch-xb) = c09bd676d21bef02e04c68c2362e32f408ea9201
SHA1 (patch-xc) = 6e1d6b21d7ded744b082173ea6f35b45999fa965
SHA1 (patch-xd) = 2ddf436186ccebab28380b9e80f52f061ca3d73e
SHA1 (patch-xe) = 1bcd9def6f9636fa9deb0edb994e5672529b615b
SHA1 (patch-xf) = 756c17e4add771f4cc2a2e6f2ad576f458ee02f0
SHA1 (patch-xg) = d8355840ee91dd64ff650a12be87f2c51d8df196
SHA1 (patch-xh) = 1a2c7def490a7509ab63eb39bc5611178e8d6a7d
SHA1 (patch-xi) = aed92831e4ef0f84619bf0ffe9aa404a74246613
SHA1 (patch-xj) = 7e237668aa4dfa55833d125d2a1464fb97ae3ada
SHA1 (patch-xk) = 16ac8dc3bb5c241452eae6833d40aaf876453761
SHA1 (patch-xl) = afd74085c01d207907d0b3bfc040bf92fd1ba8b1
SHA1 (patch-xm) = 072240b71e4738e96d258fcd481698464623735e

191
icecat/files/desktop.in Normal file
View file

@ -0,0 +1,191 @@
[Desktop Entry]
Encoding=UTF-8
Name=@MOZILLA_NAME@ Web Browser
Name[am]=
Name[ar]=
Name[az]=@MOZILLA_NAME@ Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър @MOZILLA_NAME@
Name[bn]=
Name[bs]=@MOZILLA_NAME@ web preglednik
Name[ca]=Navegador web @MOZILLA_NAME@
Name[cs]=Prohlížeč WWW @MOZILLA_NAME@
Name[cy]=Y Porwr Gwe @MOZILLA_NAME@
Name[da]=@MOZILLA_NAME@ - internetsurfning
Name[de]=@MOZILLA_NAME@ Webbrowser
Name[el]=Περιηγητής Διαδικτύου @MOZILLA_NAME@
Name[en_CA]=@MOZILLA_NAME@ Web Browser
Name[en_GB]=@MOZILLA_NAME@ Web Browser
Name[es]=Navegador Web @MOZILLA_NAME@
Name[et]=@MOZILLA_NAME@ veebibrauser
Name[eu]=@MOZILLA_NAME@ web arakatzailea
Name[fi]=@MOZILLA_NAME@, WWW-selain
Name[fr]=Navigateur Web @MOZILLA_NAME@
Name[ga]=Brabhsálaí Lín @MOZILLA_NAME@
Name[gu]=એપીફની વૅબ બ્રાઉઝર
Name[he]=דפדפן @MOZILLA_NAME@
Name[hi]=
Name[hr]=@MOZILLA_NAME@ Web preglednik
Name[hu]=@MOZILLA_NAME@ webböngésző
Name[id]=Web Browser @MOZILLA_NAME@
Name[it]=Browser web @MOZILLA_NAME@
Name[ja]=@MOZILLA_NAME@ ウェブ・ブラウザ
Name[ko]=@MOZILLA_NAME@ 웹 브라우저
Name[li]=@MOZILLA_NAME@ Web Browser
Name[lt]=@MOZILLA_NAME@ web naršyklė
Name[mk]=@MOZILLA_NAME@ веб прелистувач
Name[ml]=എപ്പിഫാനി വെബ്ബ് ബ്രൌസ‌ര്
Name[mn]=@MOZILLA_NAME@ веб хөтөч
Name[ms]=Pelungsur Web @MOZILLA_NAME@
Name[nb]=@MOZILLA_NAME@ nettleser
Name[nl]=@MOZILLA_NAME@ Webbrowser
Name[nn]=@MOZILLA_NAME@ nettlesar
Name[no]=@MOZILLA_NAME@ nettleser
Name[pa]=ਏਪੀਫਾਨੀ ਵੈੱਬ ਬਰਾਊਜ਼ਰ
Name[pl]=Przeglądarka WWW @MOZILLA_NAME@
Name[pt]=Navegador Web @MOZILLA_NAME@
Name[pt_BR]=Navegador Web @MOZILLA_NAME@
Name[ro]=Navigatorul @MOZILLA_NAME@
Name[ru]=Веб-браузер @MOZILLA_NAME@
Name[sk]=
Name[sl]=Spletni brskalnik @MOZILLA_NAME@
Name[sq]=@MOZILLA_NAME@ - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren @MOZILLA_NAME@
Name[ta]=எபிபனி வலை உலாவி
Name[tk]=@MOZILLA_NAME@ Web Ahtarçisi
Name[tr]=@MOZILLA_NAME@ Web Tarayıcı
Name[uk]=Переглядач web @MOZILLA_NAME@
Name[vi]=Trình Duyệt Web @MOZILLA_NAME@
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=@MOZILLA_NAME@ Web 浏览器
Name[zh_TW]=@MOZILLA_NAME@ 網頁瀏覽器
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web @MOZILLA_NAME@
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=વેબ બ્રાઉઝર
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME ウェブ・ブラウザ
GenericName[ko]=웹 브라우저
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=ਵੈਬ ਬਰਾਊਜ਼
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]=வலை உலாவி
GenericName[th]=เว็บบราวเซอร์
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyệt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web 浏览器
GenericName[zh_TW]=網頁瀏覽器
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=ওয়েব ব্রাউজ করুন
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=વેબમાં શોધો
Comment[he]=גלוש ברשת
Comment[hi]=वेब ब्राउज़ करें
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=ウェブを閲覧します
Comment[ko]=웹을 돌아 다닙니다
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]=വലക്കെട്ട് തിരയുക
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=ਵੈਬ ਬਰਾਊਜ਼
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=வலையில் உலாவு
Comment[th]=ใช้งานเว็บบราวเซอร์ @MOZILLA_NAME@
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyệt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]=浏览 Web
Comment[zh_TW]=瀏覽網頁
Exec=@MOZILLA@ %u
Icon=@ICECAT_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;

48
icecat/options.mk Normal file
View file

@ -0,0 +1,48 @@
# $NetBSD: options.mk,v 1.1 2009/09/11 14:01:19 yhardy Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.icecat35
PKG_SUPPORTED_OPTIONS= debug mozilla-jemalloc gnome
PLIST_VARS+= gnome
.if ${OPSYS} == "Linux" || ${OPSYS} == "SunOS"
PKG_SUGGESTED_OPTIONS+= mozilla-jemalloc
.endif
.if !empty(MACHINE_ARCH:Mi386) || !empty(MACHINE_ARCH:Msparc) || \
!empty(MACHINE_ARCH:Marm)
PKG_SUPPORTED_OPTIONS+= mozilla-jit
PKG_SUGGESTED_OPTIONS+= mozilla-jit
.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mgnome)
.include "../../devel/libgnome/buildlink3.mk"
.include "../../sysutils/gnome-vfs/buildlink3.mk"
CONFIGURE_ARGS+= --enable-gnomevfs --enable-dbus
PLIST.gnome= yes
.else
CONFIGURE_ARGS+= --disable-gnomevfs --disable-dbus
.endif
.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
CONFIGURE_ARGS+= --enable-jemalloc
. if ${OPSYS} == "SunOS"
PLIST.jemalloc= yes
. endif
.else
CONFIGURE_ARGS+= --disable-jemalloc
.endif
.if !empty(PKG_OPTIONS:Mdebug)
CONFIGURE_ARGS+= --enable-debug
.else
CONFIGURE_ARGS+= --disable-debug
.endif
.if !empty(PKG_OPTIONS:Mmozilla-jit)
CONFIGURE_ARGS+= --enable-jit
.else
CONFIGURE_ARGS+= --disable-jit
.endif

57
icecat/patches/patch-aa Normal file
View file

@ -0,0 +1,57 @@
$NetBSD: patch-aa,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- configure.in.orig 2009-07-30 17:30:11.000000000 +0200
+++ configure.in
@@ -1799,7 +1799,7 @@ case "$target" in
fi
;;
-*-freebsd*)
+*-freebsd* | *-dragonfly*)
if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then
DLL_SUFFIX=".so.1.0"
DSO_LDOPTS="-shared"
@@ -1813,6 +1813,9 @@ case "$target" in
# MKSHLIB_FORCE_ALL='-Wl,-Bforcearchive'
# MKSHLIB_UNFORCE_ALL=''
# fi
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
+ fi
;;
*-hpux*)
@@ -2349,8 +2352,15 @@ case "$target" in
if test "$LIBRUNPATH"; then
DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
fi
+ case "${target_cpu}" in
+ alpha*)
+ CFLAGS="$CFLAGS -mieee"
+ CXXFLAGS="$CXXFLAGS -mieee"
+ ;;
+ esac
;;
+
*-openvms*)
AC_DEFINE(NO_PW_GECOS)
AC_DEFINE(NO_UDSOCK)
@@ -3043,6 +3053,9 @@ dnl ====================================
case $target in
*-hpux11.*)
;;
+*-dragonfly*)
+ AC_CHECK_LIB(c, gethostbyname_r)
+ ;;
*)
AC_CHECK_LIB(c_r, gethostbyname_r)
;;
@@ -8468,6 +8481,7 @@ if test -z "$MOZ_NATIVE_NSPR"; then
AC_MSG_WARN([Recreating autoconf.mk with updated nspr-config output])
if test "$OS_ARCH" != "WINNT" && test "$OS_ARCH" != "WINCE"; then
NSPR_LIBS=`./nsprpub/config/nspr-config --prefix=$LIBXUL_DIST --exec-prefix=$MOZ_BUILD_ROOT/dist --libdir=$LIBXUL_DIST/lib --libs`
+ NSPR_LIBS="-Wl,-R${prefix}/lib/\${MOZILLA_PKG_NAME} ${NSPR_LIBS}"
$PERL -pi.bak -e "s '^NSPR_LIBS\\s*=.*'NSPR_LIBS = $NSPR_LIBS'" config/autoconf.mk
NSPR_CFLAGS=`./nsprpub/config/nspr-config --prefix=$LIBXUL_DIST --exec-prefix=$MOZ_BUILD_ROOT/dist --includedir=$LIBXUL_DIST/include/nspr --cflags`
$PERL -pi.bak -e "s '^NSPR_CFLAGS\\s*=.*'NSPR_CFLAGS = $NSPR_CFLAGS'" config/autoconf.mk

26
icecat/patches/patch-ab Normal file
View file

@ -0,0 +1,26 @@
$NetBSD: patch-ab,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- nsprpub/pr/include/md/_netbsd.h.orig 2009-06-29 18:15:06.000000000 +0200
+++ nsprpub/pr/include/md/_netbsd.h
@@ -94,6 +94,12 @@
#define _PR_INET6_PROBE
#endif
+#if __NetBSD_Version__ >= 106370000
+/* NetBSD 1.6ZK */
+#define _PR_HAVE_GETPROTO_R
+#define _PR_HAVE_GETPROTO_R_INT
+#endif
+
#define USE_SETJMP
#ifndef _PR_PTHREADS
@@ -107,6 +113,8 @@
#define JB_SP_INDEX 2
#elif defined(__mips__)
#define JB_SP_INDEX 4
+#elif defined(__amd64__)
+#define JB_SP_INDEX 6
#elif defined(__alpha__)
#define JB_SP_INDEX 34
#elif defined(__arm32__)

83
icecat/patches/patch-ac Normal file
View file

@ -0,0 +1,83 @@
$NetBSD: patch-ac,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- nsprpub/configure.in.orig 2009-07-30 17:30:26.000000000 +0200
+++ nsprpub/configure.in
@@ -71,7 +71,7 @@ OBJDIR_NAME=.
OBJDIR_SUFFIX=OBJ
NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
NOSUCHFILE=/no-such-file
-LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
+LIBNSPR='-Wl,-R${prefix}/lib/${MOZILLA_PKG_NAME} -L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
CYGWIN_WRAPPER=
MACOS_SDK_DIR=
@@ -1160,6 +1160,34 @@ tools are selected during the Xcode/Deve
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
MDCPUCFG_H=_freebsd.cfg
PR_MD_CSRCS=freebsd.c
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ fi
+ ;;
+
+*-dragonfly*)
+ if test -z "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=1
+ fi
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(FREEBSD)
+ AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
+ MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ if test "$MOZ_OBJFORMAT" = "elf"; then
+ DLL_SUFFIX=so
+ else
+ DLL_SUFFIX=so.1.0
+ fi
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+ MDCPUCFG_H=_freebsd.cfg
+ PR_MD_CSRCS=freebsd.c
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ fi
;;
*-hpux*)
@@ -1731,6 +1759,7 @@ mips-nec-sysv*)
AC_DEFINE(XP_UNIX)
AC_DEFINE(NETBSD)
AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
if test -z "$USE_NSPR_THREADS"; then
USE_PTHREADS=1
fi
@@ -2511,7 +2540,7 @@ if test -n "$USE_PTHREADS"; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
ac_cv_have_dash_pthread=yes
case "$target_os" in
- freebsd*)
+ freebsd* | dragonfly*)
# Freebsd doesn't use -pthread for compiles, it uses them for linking
;;
*)
@@ -2549,7 +2578,7 @@ if test -n "$USE_PTHREADS"; then
_PTHREAD_LDFLAGS=
fi
;;
- *-freebsd*)
+ *-freebsd* | *-dragonfly*)
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
dnl -pthread links in -lc_r, so don't specify it explicitly.
@@ -2630,7 +2659,7 @@ case "$target" in
AC_DEFINE(_PR_NEED_PTHREAD_INIT)
fi
;;
-*-freebsd*)
+*-freebsd* | *-dragonfly*)
if test -n "$USE_NSPR_THREADS"; then
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi

13
icecat/patches/patch-ad Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: patch-ad,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- xpcom/io/nsLocalFileUnix.h.orig 2009-06-29 18:15:32.000000000 +0200
+++ xpcom/io/nsLocalFileUnix.h
@@ -75,7 +75,7 @@
#endif
// so we can statfs on freebsd
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || ((defined(__DragonFly__) || defined(__NetBSD__)) && !defined(HAVE_STATVFS))
#define HAVE_SYS_STATFS_H
#define STATFS statfs
#include <sys/param.h>

43
icecat/patches/patch-ae Normal file
View file

@ -0,0 +1,43 @@
$NetBSD: patch-ae,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- nsprpub/pr/src/misc/prnetdb.c.orig 2009-06-29 18:15:07.000000000 +0200
+++ nsprpub/pr/src/misc/prnetdb.c
@@ -114,6 +114,11 @@ PRLock *_pr_dnsLock = NULL;
#define _PR_HAVE_5_ARG_GETPROTO_R
#endif
+#if __DragonFly_version >= 200202
+#define _PR_HAVE_GETPROTO_R
+#define _PR_HAVE_5_ARG_GETPROTO_R
+#endif
+
/* BeOS has glibc but not the glibc-style getprotobyxxx_r functions. */
#if (defined(__GLIBC__) && __GLIBC__ >= 2 && !defined(XP_BEOS))
#define _PR_HAVE_GETPROTO_R
@@ -331,7 +336,7 @@ _pr_QueryNetIfs(void)
}
#elif (defined(DARWIN) && defined(HAVE_GETIFADDRS)) || defined(FREEBSD) \
- || defined(NETBSD) || defined(OPENBSD)
+ || defined(NETBSD) || defined(OPENBSD) || defined(DRAGONFLY)
/*
* Use the BSD getifaddrs function.
@@ -2039,7 +2044,17 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInf
*/
hints.ai_socktype = SOCK_STREAM;
+/* NetBSD >= 2.99.9 has a thread-safe resolver */
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900
+ LOCK_DNS();
+#endif
+
rv = GETADDRINFO(hostname, NULL, &hints, &res);
+
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900
+ UNLOCK_DNS();
+#endif
+
if (rv == 0)
return (PRAddrInfo *) res;

32
icecat/patches/patch-af Normal file
View file

@ -0,0 +1,32 @@
$NetBSD: patch-af,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- config/mkdepend/imakemdep.h.orig 2009-06-29 18:14:41.000000000 +0200
+++ config/mkdepend/imakemdep.h
@@ -235,7 +235,7 @@ in this Software without prior written a
#ifdef _CRAY
#define DEFAULT_CPP "/lib/pcpp"
#endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#define DEFAULT_CPP "/usr/libexec/cpp"
#endif
#ifdef MACH
@@ -273,7 +273,7 @@ char *cpp_argv[ARGUMENTS] = {
#ifdef unix
"-Uunix", /* remove unix symbol so that filename unix.c okay */
#endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(MACH)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(MACH) || defined(__DragonFly__)
# ifdef __i386__
"-D__i386__",
# endif
@@ -713,6 +713,9 @@ struct symtab predefs[] = {
#ifdef __sgi
{"__sgi", "1"},
#endif
+#ifdef __DragonFly__
+ {"__DragonFly__", "1"},
+#endif
#ifdef __FreeBSD__
{"__FreeBSD__", "1"},
#endif

31
icecat/patches/patch-ag Normal file
View file

@ -0,0 +1,31 @@
$NetBSD: patch-ag,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- nsprpub/pr/include/md/_freebsd.h.orig 2009-06-29 18:15:06.000000000 +0200
+++ nsprpub/pr/include/md/_freebsd.h
@@ -79,7 +79,7 @@
#define _PR_NO_LARGE_FILES
#if defined(_PR_PTHREADS)
-#if __FreeBSD_version >= 400008
+#if defined(__DragonFly__) || __FreeBSD_version >= 400008
/*
* libc_r before this version of FreeBSD doesn't have poll().
* Although libc has poll(), it is not thread-safe so we can't
@@ -88,7 +88,7 @@
#define _PR_POLL_AVAILABLE
#endif
#else
-#if __FreeBSD_version >= 300000
+#if defined(__DragonFly__) || __FreeBSD_version >= 300000
#define _PR_POLL_AVAILABLE
#define _PR_USE_POLL
#endif
@@ -97,7 +97,7 @@
#define _PR_HAVE_SYSV_SEMAPHORES
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
-#if __FreeBSD_version >= 400014
+#if defined(__DragonFly__) || __FreeBSD_version >= 400014
#define _PR_INET6
#define _PR_HAVE_INET_NTOP
#define _PR_HAVE_GETHOSTBYNAME2

18
icecat/patches/patch-ah Normal file
View file

@ -0,0 +1,18 @@
$NetBSD: patch-ah,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h.orig 2009-06-29 18:15:33.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h
@@ -77,6 +77,13 @@
#define THUNK_BASED_THIS_ADJUST
#endif
+#elif defined(__DragonFly__)
+# if defined(__FreeBSD_cc_version)
+# define CFRONT_STYLE_THIS_ADJUST
+# else
+# define THUNK_BASED_THIS_ADJUST
+# endif
+
#elif defined(__FreeBSD__)
/* System versions of gcc on FreeBSD don't use thunks. On 3.x, the system
* compiler is gcc 2.7.2.3, which doesn't use thunks by default. On 4.x and

13
icecat/patches/patch-ai Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: patch-ai,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- dbm/src/mktemp.c.orig 2009-06-29 18:14:43.000000000 +0200
+++ dbm/src/mktemp.c
@@ -90,7 +90,7 @@ mktemp(char *path)
static int
_gettemp(char *path, register int *doopen, int extraFlags)
{
-#if !defined(_WINDOWS) || defined(_WIN32)
+#if (!defined(_WINDOWS) || defined(_WIN32)) && !defined(errno)
extern int errno;
#endif
register char *start, *trv;

20
icecat/patches/patch-aj Normal file
View file

@ -0,0 +1,20 @@
$NetBSD: patch-aj,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- profile/dirserviceprovider/src/nsProfileLock.cpp.orig 2009-06-29 18:15:11.000000000 +0200
+++ profile/dirserviceprovider/src/nsProfileLock.cpp
@@ -391,6 +391,7 @@ nsresult nsProfileLock::LockWithSymlink(
act.sa_flags = 0;
sigfillset(&act.sa_mask);
+#ifndef DEBUG
#define CATCH_SIGNAL(signame) \
PR_BEGIN_MACRO \
if (sigaction(signame, NULL, &oldact) == 0 && \
@@ -409,6 +410,7 @@ PR_BEGIN_MACRO
CATCH_SIGNAL(SIGTERM);
#undef CATCH_SIGNAL
+#endif
}
}
}

19
icecat/patches/patch-ak Normal file
View file

@ -0,0 +1,19 @@
$NetBSD: patch-ak,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- toolkit/components/places/src/nsMorkHistoryImporter.cpp.orig 2009-06-29 18:15:22.000000000 +0200
+++ toolkit/components/places/src/nsMorkHistoryImporter.cpp
@@ -148,9 +148,12 @@ AddToHistoryCB(const nsCSubstring &aRowI
}
PRTime date;
- if (PR_sscanf(values[kLastVisitColumn].get(), "%lld", &date) != 1) {
+ long long ld;
+ if (PR_sscanf(values[kLastVisitColumn].get(), "%lld", &ld) != 1) {
date = -1;
- }
+ } else {
+ date = ld;
+ }
PRBool isTyped = values[kTypedColumn].EqualsLiteral("1");
PRInt32 transition = isTyped ?

27
icecat/patches/patch-al Normal file
View file

@ -0,0 +1,27 @@
$NetBSD: patch-al,v 1.1 2009/09/11 14:01:19 yhardy Exp $
# Reported upstream as https://bugzilla.mozilla.org/show_bug.cgi?id=471179
--- nsprpub/pr/src/misc/prsystem.c.orig 2009-06-29 18:15:07.000000000 +0200
+++ nsprpub/pr/src/misc/prsystem.c
@@ -284,6 +284,20 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMem
long pageCount = sysconf(_SC_PHYS_PAGES);
bytes = (PRUint64) pageSize * pageCount;
+#elif defined(NETBSD)
+
+ int mib[2];
+ int rc;
+ uint64_t memSize;
+ size_t len = sizeof(memSize);
+
+ mib[0] = CTL_HW;
+ mib[1] = HW_PHYSMEM64;
+ rc = sysctl( mib, 2, &memSize, &len, NULL, 0 );
+ if ( -1 != rc ) {
+ bytes = memSize;
+ }
+
#elif defined(HPUX)
struct pst_static info;

17
icecat/patches/patch-am Normal file
View file

@ -0,0 +1,17 @@
$NetBSD: patch-am,v 1.1 2009/09/11 14:01:19 yhardy Exp $
SHA1_Update conflicts with openssl which may be dynamically loaded
at runtime via libcups or libgssapi so causing a crash due to using
the wrong binding. So rename here to avoid conflict.
--- security/nss/lib/freebl/blapi.h.orig 2009-06-29 18:15:13.000000000 +0200
+++ security/nss/lib/freebl/blapi.h
@@ -925,6 +925,8 @@ extern void SHA1_DestroyContext(SHA1Cont
*/
extern void SHA1_Begin(SHA1Context *cx);
+#define SHA1_Update NSS_SHA1_Update
+
/*
** Update the SHA-1 hash function with more data.
** "cx" the context

48
icecat/patches/patch-an Normal file
View file

@ -0,0 +1,48 @@
$NetBSD: patch-an,v 1.1 2009/09/11 14:01:19 yhardy Exp $
SHA1_Update conflicts with openssl which may be dynamically loaded
at runtime via libcups or libgssapi so causing a crash due to using
the wrong binding. So rename here to avoid conflict.
--- security/nss/lib/freebl/sha-fast-amd64-sun.s.orig 2009-06-29 18:15:14.000000000 +0200
+++ security/nss/lib/freebl/sha-fast-amd64-sun.s
@@ -1712,9 +1712,9 @@ shaCompress:
.LFE7:
.size shaCompress, .-shaCompress
.align 16
-.globl SHA1_Update
- .type SHA1_Update, @function
-SHA1_Update:
+.globl NSS_SHA1_Update
+ .type NSS_SHA1_Update, @function
+NSS_SHA1_Update:
.LFB5:
pushq %rbp
.LCFI5:
@@ -1800,7 +1800,7 @@ SHA1_Update:
call shaCompress
jmp .L245
.LFE5:
- .size SHA1_Update, .-SHA1_Update
+ .size NSS_SHA1_Update, .-NSS_SHA1_Update
.section .rodata
.align 32
.type bulk_pad.0, @object
@@ -1902,7 +1902,7 @@ SHA1_End:
subl %r8d, %edx
andl $63, %edx
incl %edx
- call SHA1_Update@PLT
+ call NSS_SHA1_Update@PLT
movq %rbx, %rdi
movq %r12, %rsi
shrq $32, %rdi
@@ -2018,7 +2018,7 @@ SHA1_HashBuf:
movl %r12d, %edx
movq %r13, %rsi
movq %rbx, %rdi
- call SHA1_Update@PLT
+ call NSS_SHA1_Update@PLT
leaq -292(%rbp), %rdx
movq %r14, %rsi
movq %rbx, %rdi

24
icecat/patches/patch-ao Normal file
View file

@ -0,0 +1,24 @@
$NetBSD: patch-ao,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- toolkit/mozapps/installer/packager.mk.orig 2009-06-29 18:15:27.000000000 +0200
+++ toolkit/mozapps/installer/packager.mk
@@ -449,8 +449,8 @@ endif
(cd $(DIST)/$(MOZ_PKG_DIR) && tar $(TAR_CREATE_FLAGS) - .) | \
(cd $(DESTDIR)$(installdir) && tar -xf -)
$(NSINSTALL) -D $(DESTDIR)$(bindir)
- $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME)
- ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
+ $(RM) -f $(DESTDIR)$(bindir)/$(MOZILLA_PKG_NAME)
+ ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)/$(MOZILLA_PKG_NAME)
ifdef INSTALL_SDK # Here comes the hard part
# include directory is stable (dist/sdk/include) and unstable (dist/include)
$(NSINSTALL) -D $(DESTDIR)$(includedir)/stable
@@ -458,7 +458,7 @@ ifdef INSTALL_SDK # Here comes the hard
(cd $(DIST)/sdk/include && tar $(TAR_CREATE_FLAGS) - .) | \
(cd $(DESTDIR)$(includedir)/stable && tar -xf -)
# The dist/include has module subdirectories that we need to flatten
- find $(DIST)/include -xtype f -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \;
+ find $(DIST)/include -type f -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \;
# IDL directory is stable (dist/sdk/idl) and unstable (dist/idl)
$(NSINSTALL) -D $(DESTDIR)$(idldir)/stable
$(NSINSTALL) -D $(DESTDIR)$(idldir)/unstable

13
icecat/patches/patch-ap Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: patch-ap,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- media/liboggz/include/oggz/oggz_off_t_generated.h.orig 2009-06-29 18:15:03.000000000 +0200
+++ media/liboggz/include/oggz/oggz_off_t_generated.h
@@ -59,7 +59,7 @@
#include <sys/types.h>
-#if defined(__APPLE__) || defined(SOLARIS)
+#if defined(__APPLE__) || defined(SOLARIS) || defined(__NetBSD__) || defined(__DragonFly__)
typedef off_t oggz_off_t;
#else
typedef loff_t oggz_off_t;

13
icecat/patches/patch-aq Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: patch-aq,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- media/liboggplay/src/liboggplay/std_semaphore.h.orig 2009-06-29 18:15:03.000000000 +0200
+++ media/liboggplay/src/liboggplay/std_semaphore.h
@@ -74,7 +74,7 @@
* @retval non-zero on error
*/
-#if defined(linux) || defined(SOLARIS)
+#if defined(linux) || defined(SOLARIS) || defined(__NetBSD__) || defined(__DragonFly__)
#include <semaphore.h>
#define SEM_CREATE(p,s) sem_init(&(p), 1, s)
#define SEM_SIGNAL(p) sem_post(&(p))

39
icecat/patches/patch-ar Normal file
View file

@ -0,0 +1,39 @@
$NetBSD: patch-ar,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Enable the sunaudio module to build on NetBSD.
--- media/libsydneyaudio/src/sydney_audio_sunaudio.c.orig 2009-06-29 18:15:03.000000000 +0200
+++ media/libsydneyaudio/src/sydney_audio_sunaudio.c
@@ -38,9 +38,14 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#if defined(__NetBSD__)
+#include <sys/ioctl.h>
+#include <sys/audioio.h>
+#else
#include <stropts.h>
#include <sys/audio.h>
#include <sys/mixer.h>
+#endif
#include <errno.h>
#include <stdio.h>
#include <pthread.h>
@@ -197,7 +202,7 @@ sa_stream_open(sa_stream_t *s)
s->default_rate = audio_info.play.sample_rate;
s->default_precision = audio_info.play.precision;
- AUDIO_INITINFO(&audio_info)
+ AUDIO_INITINFO(&audio_info);
audio_info.play.sample_rate = s->rate;
audio_info.play.channels = s->n_channels;
@@ -210,7 +215,7 @@ sa_stream_open(sa_stream_t *s)
if (err== -1)
return SA_ERROR_NOT_SUPPORTED;
- AUDIO_INITINFO(&audio_info)
+ AUDIO_INITINFO(&audio_info);
err=ioctl(fd,AUDIO_GETINFO,&audio_info);
if (err== -1)
{

33
icecat/patches/patch-as Normal file
View file

@ -0,0 +1,33 @@
$NetBSD: patch-as,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Treat DragonFly like FreeBSD.
--- js/src/configure.in.orig 2009-06-29 18:14:51.000000000 +0200
+++ js/src/configure.in
@@ -1693,7 +1693,7 @@ case "$target" in
fi
;;
-*-freebsd*)
+*-freebsd*|*-dragonfly*)
if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then
DLL_SUFFIX=".so.1.0"
DSO_LDOPTS="-shared"
@@ -2504,7 +2504,7 @@ darwin*)
solaris*)
AC_DEFINE(AVMPLUS_UNIX)
;;
-freebsd*|kfreebsd*)
+freebsd*|kfreebsd*|netbsd*|dragonfly*)
AC_DEFINE(AVMPLUS_UNIX)
;;
*cygwin*|*mingw*|*mks*|*msvc*|*wince)
@@ -4185,7 +4185,7 @@ if test "$MOZ_MEMORY"; then
darwin*)
AC_DEFINE(MOZ_MEMORY_DARWIN)
;;
- *freebsd*)
+ *freebsd*|dragonfly*)
AC_DEFINE(MOZ_MEMORY_BSD)
;;
*linux*)

15
icecat/patches/patch-at Normal file
View file

@ -0,0 +1,15 @@
$NetBSD: patch-at,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Treat DragonFly like FreeBSD.
--- gfx/qcms/qcmstypes.h.orig 2009-06-29 18:14:50.000000000 +0200
+++ gfx/qcms/qcmstypes.h
@@ -23,7 +23,7 @@ typedef PRUint64 uint64_t;
#ifdef __OS2__
/* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
#include <stdlib.h>
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
/* FreeBSD typedefs uintptr_t in /usr/include/sys/types.h */
#else
typedef PRUptrdiff uintptr_t;

26
icecat/patches/patch-au Normal file
View file

@ -0,0 +1,26 @@
$NetBSD: patch-au,v 1.1 2009/09/11 14:01:19 yhardy Exp $
SOUND_VERSION just isn't a reliable way to detect features supported by
particular OSS implementation.
--- media/libsydneyaudio/src/sydney_audio_oss.c.orig 2009-06-29 18:15:03.000000000 +0200
+++ media/libsydneyaudio/src/sydney_audio_oss.c
@@ -51,9 +51,9 @@
// support only versions newer than 3.6.1
#define SUPP_OSS_VERSION OSS_VERSION(3,6,1)
-#if (SOUND_VERSION < SUPP_OSS_VERSION)
-#error Unsupported OSS Version
-#else
+//#if (SOUND_VERSION < SUPP_OSS_VERSION)
+//#error Unsupported OSS Version
+//#else
typedef struct sa_buf sa_buf;
struct sa_buf {
@@ -716,4 +716,4 @@ UNSUPPORTED(int sa_stream_drain(sa_strea
const char *sa_strerror(int code) { return NULL; }
-#endif
+//#endif

40
icecat/patches/patch-av Normal file
View file

@ -0,0 +1,40 @@
$NetBSD: patch-av,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- browser/app/nsBrowserApp.cpp.orig 2009-06-29 18:14:40.000000000 +0200
+++ browser/app/nsBrowserApp.cpp
@@ -44,6 +44,27 @@
#include <stdio.h>
#include <stdarg.h>
+#include <sys/resource.h>
+/*
+ * On netbsd-4, ulimit -n is 64 by default; too few for us.
+ */
+static void netbsd_fixrlimit(void) {
+ struct rlimit rlp;
+ if (getrlimit(RLIMIT_NOFILE, &rlp) == -1) {
+ fprintf(stderr, "warning: getrlimit failed\n");
+ return;
+ }
+ if (rlp.rlim_cur >= 512)
+ return;
+ if (rlp.rlim_max < 512) {
+ fprintf(stderr, "warning: hard limit of 'ulimit -n' too low\n");
+ rlp.rlim_cur = rlp.rlim_max;
+ }
+ else
+ rlp.rlim_cur = 512;
+ if (setrlimit(RLIMIT_NOFILE, &rlp) == -1)
+ fprintf(stderr, "warning: setrlimit failed\n");
+}
#include "plstr.h"
#include "prprf.h"
@@ -106,6 +127,7 @@ public:
int main(int argc, char* argv[])
{
+ netbsd_fixrlimit();
ScopedLogging log;
nsCOMPtr<nsILocalFile> appini;

23
icecat/patches/patch-ma Normal file
View file

@ -0,0 +1,23 @@
$NetBSD: patch-ma,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- config/autoconf.mk.in.orig 2009-06-29 18:14:41.000000000 +0200
+++ config/autoconf.mk.in
@@ -57,14 +57,14 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+includedir = @includedir@/$(MOZILLA_PKG_NAME)
libdir = @libdir@
datadir = @datadir@
mandir = @mandir@
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+idldir = @datadir@/idl/$(MOZILLA_PKG_NAME)
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
+installdir = $(libdir)/$(MOZILLA_PKG_NAME)
+sdkdir = $(libdir)/$(MOZILLA_PKG_NAME)-sdk
DIST = $(DEPTH)/dist
LIBXUL_SDK = @LIBXUL_SDK@

72
icecat/patches/patch-mb Normal file
View file

@ -0,0 +1,72 @@
$NetBSD: patch-mb,v 1.1 2009/09/11 14:01:19 yhardy Exp $
--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2009-06-29 18:15:32.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in
@@ -64,14 +64,21 @@ include $(topsrcdir)/config/config.mk
#
# Lots of Unixish x86 flavors
#
-ifneq (,$(filter FreeBSD NetBSD OpenBSD BSD_OS Darwin,$(OS_ARCH)))
+ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD BSD_OS Darwin,$(OS_ARCH)))
+ifeq (x86_64,$(OS_TEST))
+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
+else
ifeq (86,$(findstring 86,$(OS_TEST)))
CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp
+endif
+ifeq (amd64,$(OS_TEST))
+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
+endif
+endif
ifeq (Darwin,$(OS_ARCH))
DEFINES += -DKEEP_STACK_16_BYTE_ALIGNED
endif
endif
-endif
#
# New code for Linux, et. al., with gcc
# Migrate other platforms here after testing
@@ -185,7 +192,7 @@ endif
# NetBSD/ARM
#
ifeq ($(OS_ARCH),NetBSD)
-ifneq (,$(filter arm% sa110,$(OS_TEST)))
+ifneq (,$(filter arm%,$(TARGET_CPU)))
CPPSRCS := xptcinvoke_arm_netbsd.cpp xptcstubs_arm_netbsd.cpp
endif
endif
@@ -240,7 +247,7 @@ endif
# NetBSD/m68k
#
ifeq ($(OS_ARCH),NetBSD)
-ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST)))
+ifneq (,$(filter m68k,$(TARGET_CPU)))
CPPSRCS := xptcinvoke_netbsd_m68k.cpp xptcstubs_netbsd_m68k.cpp
endif
endif
@@ -325,9 +332,10 @@ endif
#
# NetBSD/PPC
#
-ifneq (,$(filter NetBSDmacppc NetBSDbebox NetBSDofppc NetBSDprep NetBSDamigappc,$(OS_ARCH)$(OS_TEST)))
+ifeq ($(OS_ARCH)$(OS_TEST),NetBSDpowerpc)
CPPSRCS := xptcinvoke_ppc_netbsd.cpp xptcstubs_ppc_netbsd.cpp
ASFILES := xptcinvoke_asm_ppc_netbsd.s xptcstubs_asm_ppc_netbsd.s
+AS := $(CC) -c -x assembler-with-cpp
endif
#
@@ -399,6 +407,13 @@ CPPSRCS := xptcinvoke_sparc64_openbsd.c
ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s
endif
#
+# NetBSD/SPARC64
+#
+ifeq ($(OS_ARCH)$(OS_TEST),NetBSDsparc64)
+CPPSRCS := xptcinvoke_sparc64_netbsd.cpp xptcstubs_sparc64_netbsd.cpp
+ASFILES := xptcinvoke_asm_sparc64_netbsd.s xptcstubs_asm_sparc64_netbsd.s
+endif
+#
# Solaris/SPARC
#
ifeq ($(OS_ARCH),SunOS)

17
icecat/patches/patch-md Normal file
View file

@ -0,0 +1,17 @@
$NetBSD: patch-md,v 1.1 2009/09/11 14:01:19 yhardy Exp $
???. from www/firefox/patch-ax.
--- security/coreconf/SunOS5.mk.orig 2009-06-29 18:15:11.000000000 +0200
+++ security/coreconf/SunOS5.mk
@@ -156,6 +156,10 @@ endif
endif
DSO_LDOPTS += -z combreloc -z defs -z ignore
+ifdef LIBRUNPATH
+DSO_LDOPTS += -R$(LIBRUNPATH)
+endif
+
# -KPIC generates position independent code for use in shared libraries.
# (Similarly for -fPIC in case of gcc.)
ifdef NS_USE_GCC

15
icecat/patches/patch-me Normal file
View file

@ -0,0 +1,15 @@
$NetBSD: patch-me,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Add DragonFly support.
--- security/nss/lib/freebl/Makefile.orig 2009-06-29 18:15:13.000000000 +0200
+++ security/nss/lib/freebl/Makefile
@@ -212,7 +212,7 @@ endif
# to bind the blapi function references in FREEBLVector vector
# (ldvector.c) to the blapi functions defined in the freebl
# shared libraries.
-ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET)))
+ifeq (,$(filter-out BSD_OS DragonFly FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET)))
MKSHLIB += -Wl,-Bsymbolic
endif

21
icecat/patches/patch-mf Normal file
View file

@ -0,0 +1,21 @@
$NetBSD: patch-mf,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Add DragonFly support.
Make sure nss libraries have a run path defined.
--- security/coreconf/config.mk.orig 2009-07-30 17:30:28.000000000 +0200
+++ security/coreconf/config.mk
@@ -63,7 +63,7 @@ endif
#######################################################################
TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \
- OpenVMS AIX RISCOS WINNT WIN95 WINCE
+ OpenVMS AIX RISCOS DragonFly WINNT WIN95 WINCE
ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
@@ -207,3 +207,4 @@ endif
DEFINES += -DUSE_UTIL_DIRECTLY
USE_UTIL_DIRECTLY = 1
+EXTRA_SHARED_LIBS += -Wl,-R${PREFIX}/lib/${MOZILLA_PKG_NAME}

90
icecat/patches/patch-mg Normal file
View file

@ -0,0 +1,90 @@
$NetBSD: patch-mg,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Add DragonFly support.
--- security/coreconf/DragonFly.mk.orig 2009-06-30 22:20:24.000000000 +0200
+++ security/coreconf/DragonFly.mk
@@ -0,0 +1,83 @@
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+#
+# The Original Code is the Netscape security libraries.
+#
+# The Initial Developer of the Original Code is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1994-2000 Netscape Communications Corporation. All
+# Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the
+# terms of the GNU General Public License Version 2 or later (the
+# "GPL"), in which case the provisions of the GPL are applicable
+# instead of those above. If you wish to allow use of your
+# version of this file only under the terms of the GPL and not to
+# allow others to use your version of this file under the MPL,
+# indicate your decision by deleting the provisions above and
+# replace them with the notice and other provisions required by
+# the GPL. If you do not delete the provisions above, a recipient
+# may use your version of this file under either the MPL or the
+# GPL.
+#
+# Config stuff for DragonFly
+#
+
+include $(CORE_DEPTH)/coreconf/UNIX.mk
+
+DEFAULT_COMPILER = gcc
+CC = gcc
+CCC = g++
+RANLIB = ranlib
+
+ifeq ($(OS_TEST),alpha)
+CPU_ARCH = alpha
+else
+CPU_ARCH = x86
+endif
+
+OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+
+DSO_CFLAGS = -fPIC
+DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@)
+
+#
+# The default implementation strategy for FreeBSD is pthreads.
+#
+ifndef CLASSIC_NSPR
+USE_PTHREADS = 1
+DEFINES += -D_THREAD_SAFE -D_REENTRANT
+OS_LIBS += -pthread
+DSO_LDOPTS += -pthread
+endif
+
+ARCH = freebsd
+
+MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo aout)
+
+DLL_SUFFIX = so
+
+ifdef LIBRUNPATH
+DSO_LDOPTS += -Wl,-R$(LIBRUNPATH)
+endif
+
+MKSHLIB = $(CC) $(DSO_LDOPTS)
+ifdef MAPFILE
+# Add LD options to restrict exported symbols to those in the map file
+endif
+# Change PROCESS to put the mapfile in the correct format for this platform
+PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@
+
+G++INCLUDES = -I/usr/include/g++
+
+INCLUDES += -I/usr/X11R6/include

15
icecat/patches/patch-mi Normal file
View file

@ -0,0 +1,15 @@
$NetBSD: patch-mi,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Add DragonFly support.
--- config/config.mk.orig 2009-06-29 18:14:41.000000000 +0200
+++ config/config.mk
@@ -133,7 +133,7 @@ endif
# but save the version to allow multiple versions of the same base
# platform to be built in the same tree.
#
-ifneq (,$(filter FreeBSD HP-UX IRIX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
+ifneq (,$(filter DragonFly FreeBSD HP-UX IRIX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
OS_RELEASE := $(basename $(OS_RELEASE))
# Allow the user to ignore the OS_VERSION, which is usually irrelevant.

15
icecat/patches/patch-mj Normal file
View file

@ -0,0 +1,15 @@
$NetBSD: patch-mj,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Add DragonFly support.
--- security/coreconf/arch.mk.orig 2009-06-29 18:15:11.000000000 +0200
+++ security/coreconf/arch.mk
@@ -146,7 +146,7 @@ endif
# IRIX 6.5-ALPHA-1289139620.
#
-ifeq (,$(filter-out Linux FreeBSD IRIX,$(OS_ARCH)))
+ifeq (,$(filter-out Linux DragonFly FreeBSD IRIX,$(OS_ARCH)))
OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//')
endif

19
icecat/patches/patch-mk Normal file
View file

@ -0,0 +1,19 @@
$NetBSD: patch-mk,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Treat DragonFly like FreeBSD.
--- config/rules.mk.orig 2009-06-29 18:14:41.000000000 +0200
+++ config/rules.mk
@@ -592,6 +592,12 @@ EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
endif
endif
+ifeq ($(OS_ARCH),DragonFly)
+ifdef IS_COMPONENT
+EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
+endif
+endif
+
ifeq ($(OS_ARCH),NetBSD)
ifneq (,$(filter arc cobalt hpcmips mipsco newsmips pmax sgimips,$(OS_TEST)))
ifeq ($(MODULE),layout)

16
icecat/patches/patch-ml Normal file
View file

@ -0,0 +1,16 @@
$NetBSD: patch-ml,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Treat DragonFly like FreeBSD.
--- js/src/Makefile.in.orig 2009-06-29 18:14:51.000000000 +0200
+++ js/src/Makefile.in
@@ -429,6 +429,9 @@ endif # WINNT
ifeq ($(OS_ARCH),FreeBSD)
EXTRA_LIBS += -pthread
endif
+ifeq ($(OS_ARCH),DragonFly)
+EXTRA_LIBS += -pthread
+endif
ifeq ($(OS_ARCH),IRIX)
ifdef USE_N32
DASH_R += -n32

19
icecat/patches/patch-mm Normal file
View file

@ -0,0 +1,19 @@
$NetBSD: patch-mm,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Don't link with -lCstd on Solaris when using GCC. From Tim Zingelman.
part of PR pkg/39085
--- toolkit/library/Makefile.in.orig 2009-06-29 18:15:25.000000000 +0200
+++ toolkit/library/Makefile.in
@@ -252,7 +252,10 @@ EXTRA_DSO_LDOPTS += -lbe -ltracker
endif
ifeq ($(OS_ARCH),SunOS)
-EXTRA_DSO_LDOPTS += -lelf -ldemangle -lCstd
+EXTRA_DSO_LDOPTS += -lelf -ldemangle
+ifndef GNU_CC
+EXTRA_DSO_LDOPTS += -lCstd
+endif
endif
ifeq ($(OS_ARCH),WINNT)

15
icecat/patches/patch-mn Normal file
View file

@ -0,0 +1,15 @@
$NetBSD: patch-mn,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Make sure we link correctly with sqlite3 from pkgsrc.
--- security/nss/lib/softoken/config.mk.orig 2009-06-29 18:15:14.000000000 +0200
+++ security/nss/lib/softoken/config.mk
@@ -86,7 +86,7 @@ else
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib \
-lnssutil3 \
- -lsqlite3 \
+ `pkg-config --libs sqlite3` \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \

26
icecat/patches/patch-mp Normal file
View file

@ -0,0 +1,26 @@
$NetBSD: patch-mp,v 1.1 2009/09/11 14:01:19 yhardy Exp $
Use Sun audio on NetBSD and OSS on DragonFlyBSD.
--- media/libsydneyaudio/src/Makefile.in.orig 2009-06-29 18:15:03.000000000 +0200
+++ media/libsydneyaudio/src/Makefile.in
@@ -65,12 +65,18 @@ CSRCS = \
OS_LIBS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon
endif
-ifeq ($(OS_ARCH),SunOS)
+ifneq (,$(filter SunOS NetBSD,$(OS_ARCH)))
CSRCS = \
sydney_audio_sunaudio.c \
$(NULL)
endif
+ifeq ($(OS_ARCH),DragonFly)
+CSRCS = \
+ sydney_audio_oss.c \
+ $(NULL)
+endif
+
ifeq ($(OS_ARCH),WINNT)
OS_LIBS += winmm.lib
endif

122
icecat/patches/patch-na Normal file
View file

@ -0,0 +1,122 @@
$NetBSD: patch-na,v 1.1 2009/09/11 14:01:19 yhardy Exp $
# reported upstream as:
# https://bugzilla.mozilla.org/show_bug.cgi?id=512802
--- js/src/jsscript.cpp.orig 2009-08-24 01:32:14.000000000 +0200
+++ js/src/jsscript.cpp 2009-08-24 01:36:20.000000000 +0200
@@ -1370,19 +1370,49 @@ js_NewScript(JSContext *cx, uint32 lengt
size_t size, vectorSize;
JSScript *script;
uint8 *cursor;
+#ifdef _LP64
+#define LP64_ALIGN(V) if ((V) & 7) (V) = (((V)|7) + 1)
+#define LP64_ALIGNP(P) if ((uintptr_t)(P) & 7) (P) = (uint8*)(((uintptr_t)(P)|7) + 1)
+#else
+#define LP64_ALIGN(V)
+#define LP64_ALIGNP(V)
+#endif
- size = sizeof(JSScript) +
- sizeof(JSAtom *) * natoms +
- length * sizeof(jsbytecode) +
- nsrcnotes * sizeof(jssrcnote);
- if (nobjects != 0)
- size += sizeof(JSObjectArray) + nobjects * sizeof(JSObject *);
- if (nupvars != 0)
- size += sizeof(JSUpvarArray) + nupvars * sizeof(uint32);
- if (nregexps != 0)
- size += sizeof(JSObjectArray) + nregexps * sizeof(JSObject *);
- if (ntrynotes != 0)
- size += sizeof(JSTryNoteArray) + ntrynotes * sizeof(JSTryNote);
+ size = sizeof(JSScript);
+ if (nobjects != 0) {
+ LP64_ALIGN(size);
+ size += sizeof(JSObjectArray);
+ }
+ if (nupvars != 0) {
+ LP64_ALIGN(size);
+ size += sizeof(JSUpvarArray);
+ }
+ if (nregexps != 0) {
+ LP64_ALIGN(size);
+ size += sizeof(JSObjectArray);
+ }
+ if (ntrynotes != 0) {
+ LP64_ALIGN(size);
+ size += sizeof(JSTryNoteArray);
+ }
+ if (natoms != 0) {
+ LP64_ALIGN(size);
+ size += sizeof(JSAtom *) * natoms;
+ }
+ if (nobjects != 0) {
+ LP64_ALIGN(size);
+ size += nobjects * sizeof(JSObject *);
+ }
+ if (nupvars != 0) {
+ size += nupvars * sizeof(uint32);
+ }
+ if (nregexps != 0) {
+ LP64_ALIGN(size);
+ size += nregexps * sizeof(JSObject *);
+ }
+ size += length * sizeof(jsbytecode) +
+ nsrcnotes * sizeof(jssrcnote) +
+ ntrynotes * sizeof(JSTryNote);
script = (JSScript *) JS_malloc(cx, size);
if (!script)
@@ -1393,23 +1423,28 @@ js_NewScript(JSContext *cx, uint32 lengt
cursor = (uint8 *)script + sizeof(JSScript);
if (nobjects != 0) {
+ LP64_ALIGNP(cursor);
script->objectsOffset = (uint8)(cursor - (uint8 *)script);
cursor += sizeof(JSObjectArray);
}
if (nupvars != 0) {
+ LP64_ALIGNP(cursor);
script->upvarsOffset = (uint8)(cursor - (uint8 *)script);
cursor += sizeof(JSUpvarArray);
}
if (nregexps != 0) {
+ LP64_ALIGNP(cursor);
script->regexpsOffset = (uint8)(cursor - (uint8 *)script);
cursor += sizeof(JSObjectArray);
}
if (ntrynotes != 0) {
+ LP64_ALIGNP(cursor);
script->trynotesOffset = (uint8)(cursor - (uint8 *)script);
cursor += sizeof(JSTryNoteArray);
}
if (natoms != 0) {
+ LP64_ALIGNP(cursor);
script->atomMap.length = natoms;
script->atomMap.vector = (JSAtom **)cursor;
vectorSize = natoms * sizeof(script->atomMap.vector[0]);
@@ -1423,6 +1458,7 @@ js_NewScript(JSContext *cx, uint32 lengt
}
if (nobjects != 0) {
+ LP64_ALIGNP(cursor);
JS_SCRIPT_OBJECTS(script)->length = nobjects;
JS_SCRIPT_OBJECTS(script)->vector = (JSObject **)cursor;
vectorSize = nobjects * sizeof(JS_SCRIPT_OBJECTS(script)->vector[0]);
@@ -1431,6 +1467,7 @@ js_NewScript(JSContext *cx, uint32 lengt
}
if (nupvars != 0) {
+ LP64_ALIGNP(cursor);
JS_SCRIPT_UPVARS(script)->length = nupvars;
JS_SCRIPT_UPVARS(script)->vector = (uint32 *)cursor;
vectorSize = nupvars * sizeof(JS_SCRIPT_UPVARS(script)->vector[0]);
@@ -1439,6 +1476,7 @@ js_NewScript(JSContext *cx, uint32 lengt
}
if (nregexps != 0) {
+ LP64_ALIGNP(cursor);
JS_SCRIPT_REGEXPS(script)->length = nregexps;
JS_SCRIPT_REGEXPS(script)->vector = (JSObject **)cursor;
vectorSize = nregexps * sizeof(JS_SCRIPT_REGEXPS(script)->vector[0]);

35
icecat/patches/patch-nb Normal file
View file

@ -0,0 +1,35 @@
$NetBSD: patch-nb,v 1.1 2009/09/11 14:01:19 yhardy Exp $
# reported upstream as:
# https://bugzilla.mozilla.org/show_bug.cgi?id=512792
--- media/liboggz/src/liboggz/oggz_byteorder.h.orig 2009-08-26 22:28:18.000000000 +0200
+++ media/liboggz/src/liboggz/oggz_byteorder.h 2009-08-26 22:41:39.000000000 +0200
@@ -123,4 +123,27 @@ int32_be_at (unsigned char *c)
return (c [0] << 24) + (c [1] << 16) + (c [2] << 8) + c [3] ;
}
+static ogg_uint32_t
+_le_32_at (unsigned char *c)
+{
+ return (c [3] << 24) + (c [2] << 16) + (c [1] << 8) + c [0] ;
+}
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+static uint64_t
+_le_64_at (unsigned char *c)
+{
+ return (uint64_t)((uint64_t)c[7] << 56) + ((uint64_t)c[6] << 48)
+ + ((uint64_t)c[5] << 40) + ((uint64_t)c[4] << 32)
+ + (c [3] << 24) + (c [2] << 16) + (c [1] << 8) + c [0] ;
+}
+
+static ogg_uint16_t
+_be_16_at (unsigned char *c)
+{
+ return (c [0] << 8) + c [1] ;
+}
+
#endif /* __OGGZ_BYTEORDER_H__ */

20
icecat/patches/patch-nc Normal file
View file

@ -0,0 +1,20 @@
$NetBSD: patch-nc,v 1.1 2009/09/11 14:01:19 yhardy Exp $
# reported upstream as:
# https://bugzilla.mozilla.org/show_bug.cgi?id=512792
--- media/liboggz/src/liboggz/oggz_auto.c.orig 2009-08-26 22:20:35.000000000 +0200
+++ media/liboggz/src/liboggz/oggz_auto.c 2009-08-26 22:40:51.000000000 +0200
@@ -62,9 +62,9 @@ int oggz_set_metric_linear (OGGZ * oggz,
ogg_int64_t granule_rate_numerator,
ogg_int64_t granule_rate_denominator);
-#define INT16_BE_AT(x) _be_16((*(ogg_int32_t *)(x)))
-#define INT32_LE_AT(x) _le_32((*(ogg_int32_t *)(x)))
-#define INT64_LE_AT(x) _le_64((*(ogg_int64_t *)(x)))
+#define INT16_BE_AT(x) _be_16_at(x)
+#define INT32_LE_AT(x) _le_32_at(x)
+#define INT64_LE_AT(x) _le_64_at(x)
static int
oggz_stream_set_numheaders (OGGZ * oggz, long serialno, int numheaders)

119
icecat/patches/patch-xa Normal file
View file

@ -0,0 +1,119 @@
$NetBSD: patch-xa,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/sparc64 xptcall support code. From pkgsrc/www/firefox3/files/
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_netbsd.s.orig 2009-07-09 10:12:51.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_netbsd.s
@@ -0,0 +1,112 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+/* Platform specific code to invoke XPCOM methods on native objects */
+ .global NS_InvokeByIndex_P
+ .type NS_InvokeByIndex_P, #function
+/*
+ NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
+ PRUint32 paramCount, nsXPTCVariant* params);
+
+*/
+/*
+ * Note: To simplify stack handling we allocate an extra stack
+ * frame here. In principle invoke_copy_to_stack() could
+ * save the parameters our caller's frame and we could
+ * reclaim the stackframe and do a tail call to the
+ * function. However, this gets complicated....
+ *
+ * The vtable consist of be:
+ *
+ * struct {
+ * short __delta;
+ * short __index;
+ * union {
+ * P __pfn;
+ * short __delta2;
+ * } __pfn_or_delta2;
+ * };
+ *
+ * See gcc/cp/cp-tree.h
+ */
+
+NS_InvokeByIndex_P:
+ save %sp,-(128 + 64),%sp ! room for the register window and
+ ! struct pointer, rounded up to 0 % 64
+ sll %i2,4,%l0 ! assume the worst case
+ ! paramCount * 2 * 8 bytes
+ cmp %l0, 0 ! are there any args? If not,
+ be .invoke ! no need to copy args to stack
+ nop
+
+ sub %sp,%l0,%sp ! create the additional stack space
+ add %sp,0x7ff+136,%o0 ! step past the register window, the
+ ! struct result pointer and the 'this' slot
+ mov %i2,%o1 ! paramCount
+ call invoke_copy_to_stack
+ mov %i3,%o2 ! params
+
+!
+! load arguments from stack into the outgoing registers
+! BIAS is 0x7ff (2047)
+!
+
+! load the %o1..5 64bit (extended word) output registers registers
+ ldx [%sp + 0x7ff + 136],%o1 ! %i1
+ ldx [%sp + 0x7ff + 144],%o2 ! %i2
+ ldx [%sp + 0x7ff + 152],%o3 ! %i3
+ ldx [%sp + 0x7ff + 160],%o4 ! %i4
+ ldx [%sp + 0x7ff + 168],%o5 ! %i5
+
+! load the even number double registers starting with %f2
+ ldd [%sp + 0x7ff + 136],%f2
+ ldd [%sp + 0x7ff + 144],%f4
+ ldd [%sp + 0x7ff + 152],%f6
+ ldd [%sp + 0x7ff + 160],%f8
+ ldd [%sp + 0x7ff + 168],%f10
+ ldd [%sp + 0x7ff + 176],%f12
+ ldd [%sp + 0x7ff + 184],%f14
+ ldd [%sp + 0x7ff + 192],%f16
+ ldd [%sp + 0x7ff + 200],%f18
+ ldd [%sp + 0x7ff + 208],%f20
+ ldd [%sp + 0x7ff + 216],%f22
+ ldd [%sp + 0x7ff + 224],%f24
+ ldd [%sp + 0x7ff + 232],%f26
+ ldd [%sp + 0x7ff + 240],%f28
+ ldd [%sp + 0x7ff + 248],%f30
+
+!
+! calculate the target address from the vtable
+!
+.invoke:
+ sll %i1,3,%l0 ! index *= 8
+ ldx [%i0],%l1 ! *this --> address of vtable
+ ldx [%l0 + %l1],%l0 ! this->vtable[index] --> address
+
+ jmpl %l0,%o7 ! call the routine
+ mov %i0,%o0 ! move 'this' pointer to out register
+
+ mov %o0,%i0 ! propagate return value
+ ret
+ restore
+
+ .size NS_InvokeByIndex_P, .-NS_InvokeByIndex_P

91
icecat/patches/patch-xb Normal file
View file

@ -0,0 +1,91 @@
$NetBSD: patch-xb,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/sparc64 xptcall support code. From pkgsrc/www/firefox3/files/
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_netbsd.cpp.orig 2009-07-09 10:12:51.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_netbsd.cpp
@@ -0,0 +1,84 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+/* Platform specific code to invoke XPCOM methods on native objects */
+
+#include "xptcprivate.h"
+
+#if !defined(__sparc64__) && !defined(_LP64)
+#error "This code is for Sparc64 only"
+#endif
+
+extern "C" PRUint32
+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
+{
+ /*
+ We need to copy the parameters for this function to locals and use them
+ from there since the parameters occupy the same stack space as the stack
+ we're trying to populate.
+ */
+ PRUint64 *l_d = d;
+ nsXPTCVariant *l_s = s;
+ PRUint64 l_paramCount = paramCount;
+ PRUint64 regCount = 0; // return the number of registers to load from the stack
+
+ for(PRUint64 i = 0; i < l_paramCount; i++, l_d++, l_s++)
+ {
+ if (regCount < 5) regCount++;
+
+ if (l_s->IsPtrData())
+ {
+ *l_d = (PRUint64)l_s->ptr;
+ continue;
+ }
+ switch (l_s->type)
+ {
+ case nsXPTType::T_I8 : *((PRInt64*)l_d) = l_s->val.i8; break;
+ case nsXPTType::T_I16 : *((PRInt64*)l_d) = l_s->val.i16; break;
+ case nsXPTType::T_I32 : *((PRInt64*)l_d) = l_s->val.i32; break;
+ case nsXPTType::T_I64 : *((PRInt64*)l_d) = l_s->val.i64; break;
+
+ case nsXPTType::T_U8 : *((PRUint64*)l_d) = l_s->val.u8; break;
+ case nsXPTType::T_U16 : *((PRUint64*)l_d) = l_s->val.u16; break;
+ case nsXPTType::T_U32 : *((PRUint64*)l_d) = l_s->val.u32; break;
+ case nsXPTType::T_U64 : *((PRUint64*)l_d) = l_s->val.u64; break;
+
+ /* in the case of floats, we want to put the bits in to the
+ 64bit space right justified... floats in the paramter array on
+ sparcv9 use odd numbered registers.. %f1, %f3, so we have to skip
+ the space that would be occupied by %f0, %f2, etc.
+ */
+ case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break;
+ case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break;
+ case nsXPTType::T_BOOL : *((PRInt64*)l_d) = l_s->val.b; break;
+ case nsXPTType::T_CHAR : *((PRUint64*)l_d) = l_s->val.c; break;
+ case nsXPTType::T_WCHAR : *((PRInt64*)l_d) = l_s->val.wc; break;
+
+ default:
+ // all the others are plain pointer types
+ *((void**)l_d) = l_s->val.p;
+ break;
+ }
+ }
+
+ return regCount;
+}

73
icecat/patches/patch-xc Normal file
View file

@ -0,0 +1,73 @@
$NetBSD: patch-xc,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/sparc64 xptcall support code. From pkgsrc/www/firefox3/files/
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc64_netbsd.s.orig 2009-07-09 10:12:51.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc64_netbsd.s
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1999 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+ .global SharedStub
+
+/*
+ in the frame for the function that called SharedStub are the
+ rest of the parameters we need
+
+*/
+
+SharedStub:
+! we don't create a new frame yet, but work within the frame of the calling
+! function to give ourselves the other parameters we want
+
+ mov %o0, %o1 ! shuffle the index up to 2nd place
+ mov %i0, %o0 ! the original 'this'
+ add %fp, 0x7ff + 136, %o2 ! previous stack top adjusted to the first argument slot (beyond 'this')
+
+! save off the original incoming parameters that arrived in
+! registers, the ABI guarantees the space for us to do this
+ stx %i1, [%fp + 0x7ff + 136]
+ stx %i2, [%fp + 0x7ff + 144]
+ stx %i3, [%fp + 0x7ff + 152]
+ stx %i4, [%fp + 0x7ff + 160]
+ stx %i5, [%fp + 0x7ff + 168]
+! now we can build our own stack frame
+ save %sp,-(128 + 64),%sp ! room for the register window and
+ ! struct pointer, rounded up to 0 % 64
+! our function now appears to have been called
+! as SharedStub(nsISupports* that, PRUint32 index, PRUint32* args)
+! so we can just copy these through
+
+ mov %i0, %o0
+ mov %i1, %o1
+ mov %i2, %o2
+ call PrepareAndDispatch
+ nop
+ mov %o0,%i0 ! propagate return value
+ b .LL1
+ nop
+.LL1:
+ ret
+ restore
+
+ .size SharedStub, .-SharedStub
+ .type SharedStub, #function

126
icecat/patches/patch-xd Normal file
View file

@ -0,0 +1,126 @@
$NetBSD: patch-xd,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/sparc64 xptcall support code. From pkgsrc/www/firefox3/files/
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_netbsd.cpp.orig 2009-07-09 10:12:51.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_netbsd.cpp
@@ -0,0 +1,119 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1999 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+/* Implement shared vtbl methods. */
+
+#include "xptcprivate.h"
+#include "xptiprivate.h"
+
+#if defined(sparc) || defined(__sparc__)
+
+extern "C" nsresult
+PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args)
+{
+
+#define PARAM_BUFFER_COUNT 16
+
+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
+ nsXPTCMiniVariant* dispatchParams = NULL;
+ const nsXPTMethodInfo* info;
+ PRUint8 paramCount;
+ PRUint8 i;
+ nsresult result = NS_ERROR_FAILURE;
+
+ NS_ASSERTION(self,"no self");
+
+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
+ NS_ASSERTION(info,"no interface info");
+
+ paramCount = info->GetParamCount();
+
+ // setup variant array pointer
+ if(paramCount > PARAM_BUFFER_COUNT)
+ dispatchParams = new nsXPTCMiniVariant[paramCount];
+ else
+ dispatchParams = paramBuffer;
+ NS_ASSERTION(dispatchParams,"no place for params");
+ if (!dispatchParams)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ PRUint64* ap = args;
+ for(i = 0; i < paramCount; i++, ap++)
+ {
+ const nsXPTParamInfo& param = info->GetParam(i);
+ const nsXPTType& type = param.GetType();
+ nsXPTCMiniVariant* dp = &dispatchParams[i];
+
+ if(param.IsOut() || !type.IsArithmetic())
+ {
+ dp->val.p = (void*) *ap;
+ continue;
+ }
+ // else
+ switch(type)
+ {
+ case nsXPTType::T_BOOL : dp->val.b = *((PRInt64*) ap); break;
+ case nsXPTType::T_CHAR : dp->val.c = *((PRUint64*) ap); break;
+ case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt64*) ap); break;
+ case nsXPTType::T_I8 : dp->val.i8 = *((PRInt64*) ap); break;
+ case nsXPTType::T_I16 : dp->val.i16 = *((PRInt64*) ap); break;
+ case nsXPTType::T_I32 : dp->val.i32 = *((PRInt64*) ap); break;
+ case nsXPTType::T_I64 : dp->val.i64 = *((PRInt64*) ap); break;
+ case nsXPTType::T_U8 : dp->val.u8 = *((PRUint64*) ap); break;
+ case nsXPTType::T_U16 : dp->val.u16 = *((PRUint64*)ap); break;
+ case nsXPTType::T_U32 : dp->val.u32 = *((PRUint64*)ap); break;
+ case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*) ap); break;
+ case nsXPTType::T_FLOAT : dp->val.f = ((float*) ap)[1]; break;
+ case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break;
+ default:
+ NS_ASSERTION(0, "bad type");
+ break;
+ }
+ }
+
+ result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
+
+ if(dispatchParams != paramBuffer)
+ delete [] dispatchParams;
+
+ return result;
+}
+
+extern "C" int SharedStub(int, int*);
+
+#define STUB_ENTRY(n) \
+nsresult nsXPTCStubBase::Stub##n() \
+{ \
+ int dummy; /* defeat tail-call optimization */ \
+ return SharedStub(n, &dummy); \
+}
+
+#define SENTINEL_ENTRY(n) \
+nsresult nsXPTCStubBase::Sentinel##n() \
+{ \
+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
+ return NS_ERROR_NOT_IMPLEMENTED; \
+}
+
+#include "xptcstubsdef.inc"
+
+#endif /* sparc || __sparc__ */

77
icecat/patches/patch-xe Normal file
View file

@ -0,0 +1,77 @@
$NetBSD: patch-xe,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/m68k xptcall support code. From pkgsrc/www/firefox/patch-ad.
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp.orig 2009-06-29 18:15:33.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp
@@ -132,6 +132,15 @@ extern "C" {
}
}
+/*
+ * SYMBOL PREFIX must be "_" for aout symbols and "" for ELF
+ */
+#ifndef __ELF__
+#define SYMBOLPREFIX "_"
+#else
+#define SYMBOLPREFIX
+#endif
+
XPTC_PUBLIC_API(nsresult)
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
@@ -139,30 +148,30 @@ XPTC_InvokeByIndex(nsISupports* that, PR
PRUint32 result;
__asm__ __volatile__(
- "movl %4, sp@-\n\t"
- "movl %3, sp@-\n\t"
- "jbsr _invoke_count_words\n\t" /* count words */
- "addql #8, sp\n\t"
- "lsll #2, d0\n\t" /* *= 4 */
- "movl sp, a2\n\t" /* save original sp */
- "subl d0, sp\n\t" /* make room for params */
- "movl sp, a0\n\t"
- "movl %4, sp@-\n\t"
- "movl %3, sp@-\n\t"
- "movl a0, sp@-\n\t"
- "jbsr _invoke_copy_to_stack\n\t" /* copy params */
- "addl #12, sp\n\t"
- "movl %1, a0\n\t"
- "movl a0@, a1\n\t"
- "movl %2, d0\n\t" /* function index */
- "movl a0, d1\n\t"
- "movw a1@(8,d0:l:8), a0\n\t"
- "addl a0, d1\n\t"
- "movl a1@(12,d0:l:8), a1\n\t"
- "movl d1, sp@-\n\t"
- "jbsr a1@\n\t"
- "movl a2, sp\n\t" /* restore original sp */
- "movl d0, %0\n\t"
+ "movl %4, %%sp@-\n\t"
+ "movl %3, %%sp@-\n\t"
+ "jbsr "SYMBOLPREFIX"invoke_count_words\n\t" /* count words */
+ "addql #8, %%sp\n\t"
+ "lsll #2, %%d0\n\t" /* *= 4 */
+ "movl %%sp, %%a2\n\t" /* save original sp */
+ "subl %%d0, %%sp\n\t" /* make room for params */
+ "movl %%sp, %%a0\n\t"
+ "movl %4, %%sp@-\n\t"
+ "movl %3, %%sp@-\n\t"
+ "movl %%a0, %%sp@-\n\t"
+ "jbsr "SYMBOLPREFIX"invoke_copy_to_stack\n\t" /* copy params */
+ "addl #12, %%sp\n\t"
+ "movl %1, %%a0\n\t"
+ "movl %%a0@, %%a1\n\t"
+ "movl %2, %%d0\n\t" /* function index */
+ "movl %%a0, %%d1\n\t"
+ "movw %%a1@(8,%%d0:l:8), %%a0\n\t"
+ "addl %%a0, %%d1\n\t"
+ "movl %%a1@(12,%%d0:l:8), %%a1\n\t"
+ "movl %%d1, %%sp@-\n\t"
+ "jbsr %%a1@\n\t"
+ "movl %%a2, %%sp\n\t" /* restore original sp */
+ "movl %%d0, %0\n\t"
: "=g" (result) /* %0 */
: "g" (that), /* %1 */
"g" (methodIndex), /* %2 */

43
icecat/patches/patch-xf Normal file
View file

@ -0,0 +1,43 @@
$NetBSD: patch-xf,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/amd64 xptcall support code. From pkgsrc/www/firefox/patch-ae.
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp.orig 2009-06-29 18:15:33.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp
@@ -123,17 +123,27 @@ extern "C" {
}
}
+/*
+ * Beware: use % instead of %% for register identifiers in a preprocessor macro
+ * SYMBOL PREFIX must be "_" for aout and "" for ELF
+ */
+#ifndef __ELF__
+#define SYMBOLPREFIX "_"
+#else
+#define SYMBOLPREFIX
+#endif
+
#define STUB_ENTRY(n) \
__asm__( \
- ".global _Stub"#n"__14nsXPTCStubBase\n\t" \
-"_Stub"#n"__14nsXPTCStubBase:\n\t" \
- "link a6,#0 \n\t" \
- "lea a6@(12), a0 \n\t" /* pointer to args */ \
- "movl a0, sp@- \n\t" \
- "movl #"#n", sp@- \n\t" /* method index */ \
- "movl a6@(8), sp@- \n\t" /* this */ \
- "jbsr _PrepareAndDispatch \n\t" \
- "unlk a6 \n\t" \
+ ".global "SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase\n\t" \
+SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase:\n\t" \
+ "link %a6,#0 \n\t" \
+ "lea %a6@(12), %a0 \n\t" /* pointer to args */ \
+ "movl %a0, %sp@- \n\t" \
+ "movl #"#n", %sp@- \n\t" /* method index */ \
+ "movl %a6@(8), %sp@- \n\t" /* this */ \
+ "jbsr "SYMBOLPREFIX"PrepareAndDispatch\n\t" \
+ "unlk %a6 \n\t" \
"rts \n\t" \
);

33
icecat/patches/patch-xg Normal file
View file

@ -0,0 +1,33 @@
$NetBSD: patch-xg,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/arm xptcall support code. From pkgsrc/www/firefox/patch-bm.
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp.orig 2009-06-29 18:15:33.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp
@@ -118,18 +118,23 @@ PrepareAndDispatch(nsXPTCStubBase* self,
* so they are contiguous with values passed on the stack, and then calls
* PrepareAndDispatch() to do the dirty work.
*/
+#ifndef __ELF__
+#define SYMBOLPREFIX "_"
+#else
+#define SYMBOLPREFIX
+#endif
#define STUB_ENTRY(n) \
__asm__( \
- ".global _Stub"#n"__14nsXPTCStubBase\n\t" \
-"_Stub"#n"__14nsXPTCStubBase:\n\t" \
+ ".global "SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase\n\t" \
+SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase:\n\t" \
"stmfd sp!, {r1, r2, r3} \n\t" \
"mov ip, sp \n\t" \
"stmfd sp!, {fp, ip, lr, pc} \n\t" \
"sub fp, ip, #4 \n\t" \
"mov r1, #"#n" \n\t" /* = methodIndex */ \
"add r2, sp, #16 \n\t" \
- "bl _PrepareAndDispatch__FP14nsXPTCStubBaseUiPUi \n\t" \
+ "bl "SYMBOLPREFIX"PrepareAndDispatch__FP14nsXPTCStubBaseUiPUi \n\t" \
"ldmea fp, {fp, sp, lr} \n\t" \
"add sp, sp, #12 \n\t" \
"mov pc, lr \n\t" \

181
icecat/patches/patch-xh Normal file
View file

@ -0,0 +1,181 @@
$NetBSD: patch-xh,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/amd64 xptcall support code. Originally from pkgsrc/www/mozilla.
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_amd64.cpp.orig 2009-06-30 22:20:24.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_amd64.cpp
@@ -0,0 +1,174 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+// Platform specific code to invoke XPCOM methods on native objects
+
+#include "xptcprivate.h"
+
+// 6 integral parameters are passed in registers
+const PRUint32 GPR_COUNT = 6;
+
+// 8 floating point parameters are passed in SSE registers
+const PRUint32 FPR_COUNT = 8;
+
+// Remember that these 'words' are 64-bit long
+static inline void
+invoke_count_words(PRUint32 paramCount, nsXPTCVariant * s,
+ PRUint32 & nr_gpr, PRUint32 & nr_fpr, PRUint32 & nr_stack)
+{
+ nr_gpr = 1; // skip one GP register for 'that'
+ nr_fpr = 0;
+ nr_stack = 0;
+
+ /* Compute number of eightbytes of class MEMORY. */
+ for (uint32 i = 0; i < paramCount; i++, s++) {
+ if (!s->IsPtrData()
+ && (s->type == nsXPTType::T_FLOAT || s->type == nsXPTType::T_DOUBLE)) {
+ if (nr_fpr < FPR_COUNT)
+ nr_fpr++;
+ else
+ nr_stack++;
+ }
+ else {
+ if (nr_gpr < GPR_COUNT)
+ nr_gpr++;
+ else
+ nr_stack++;
+ }
+ }
+}
+
+static void
+invoke_copy_to_stack(PRUint64 * d, PRUint32 paramCount, nsXPTCVariant * s,
+ PRUint64 * gpregs, double * fpregs)
+{
+ PRUint32 nr_gpr = 1; // skip one GP register for 'that'
+ PRUint32 nr_fpr = 0;
+ PRUint64 value;
+
+ for (uint32 i = 0; i < paramCount; i++, s++) {
+ if (s->IsPtrData())
+ value = (PRUint64) s->ptr;
+ else {
+ switch (s->type) {
+ case nsXPTType::T_FLOAT: break;
+ case nsXPTType::T_DOUBLE: break;
+ case nsXPTType::T_I8: value = s->val.i8; break;
+ case nsXPTType::T_I16: value = s->val.i16; break;
+ case nsXPTType::T_I32: value = s->val.i32; break;
+ case nsXPTType::T_I64: value = s->val.i64; break;
+ case nsXPTType::T_U8: value = s->val.u8; break;
+ case nsXPTType::T_U16: value = s->val.u16; break;
+ case nsXPTType::T_U32: value = s->val.u32; break;
+ case nsXPTType::T_U64: value = s->val.u64; break;
+ case nsXPTType::T_BOOL: value = s->val.b; break;
+ case nsXPTType::T_CHAR: value = s->val.c; break;
+ case nsXPTType::T_WCHAR: value = s->val.wc; break;
+ default: value = (PRUint64) s->val.p; break;
+ }
+ }
+
+ if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
+ if (nr_fpr < FPR_COUNT)
+ fpregs[nr_fpr++] = s->val.d;
+ else {
+ *((double *)d) = s->val.d;
+ d++;
+ }
+ }
+ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
+ if (nr_fpr < FPR_COUNT)
+ // The value in %xmm register is already prepared to
+ // be retrieved as a float. Therefore, we pass the
+ // value verbatim, as a double without conversion.
+ fpregs[nr_fpr++] = s->val.d;
+ else {
+ *((float *)d) = s->val.f;
+ d++;
+ }
+ }
+ else {
+ if (nr_gpr < GPR_COUNT)
+ gpregs[nr_gpr++] = value;
+ else
+ *d++ = value;
+ }
+ }
+}
+
+extern "C"
+XPTC_PUBLIC_API(nsresult)
+XPTC_InvokeByIndex(nsISupports * that, PRUint32 methodIndex,
+ PRUint32 paramCount, nsXPTCVariant * params)
+{
+ PRUint32 nr_gpr, nr_fpr, nr_stack;
+ invoke_count_words(paramCount, params, nr_gpr, nr_fpr, nr_stack);
+
+ // Stack, if used, must be 16-bytes aligned
+ if (nr_stack)
+ nr_stack = (nr_stack + 1) & ~1;
+
+ // Load parameters to stack, if necessary
+ PRUint64 *stack = (PRUint64 *) __builtin_alloca(nr_stack * 8);
+ PRUint64 gpregs[GPR_COUNT];
+ double fpregs[FPR_COUNT];
+ invoke_copy_to_stack(stack, paramCount, params, gpregs, fpregs);
+
+ // Load FPR registers from fpregs[]
+ register double d0 asm("xmm0");
+ register double d1 asm("xmm1");
+ register double d2 asm("xmm2");
+ register double d3 asm("xmm3");
+ register double d4 asm("xmm4");
+ register double d5 asm("xmm5");
+ register double d6 asm("xmm6");
+ register double d7 asm("xmm7");
+
+ switch (nr_fpr) {
+#define ARG_FPR(N) \
+ case N+1: d##N = fpregs[N];
+ ARG_FPR(7);
+ ARG_FPR(6);
+ ARG_FPR(5);
+ ARG_FPR(4);
+ ARG_FPR(3);
+ ARG_FPR(2);
+ ARG_FPR(1);
+ ARG_FPR(0);
+ case 0:;
+#undef ARG_FPR
+ }
+
+ // Load GPR registers from gpregs[]
+ register PRUint64 a0 asm("rdi");
+ register PRUint64 a1 asm("rsi");
+ register PRUint64 a2 asm("rdx");
+ register PRUint64 a3 asm("rcx");
+ register PRUint64 a4 asm("r8");
+ register PRUint64 a5 asm("r9");
+
+ switch (nr_gpr) {
+#define ARG_GPR(N) \
+ case N+1: a##N = gpregs[N];
+ ARG_GPR(5);
+ ARG_GPR(4);
+ ARG_GPR(3);
+ ARG_GPR(2);
+ ARG_GPR(1);
+ case 1: a0 = (PRUint64) that;
+ case 0:;
+#undef ARG_GPR
+ }
+
+ // Ensure that assignments to SSE registers won't be optimized away
+ asm("" ::
+ "x" (d0), "x" (d1), "x" (d2), "x" (d3),
+ "x" (d4), "x" (d5), "x" (d6), "x" (d7));
+
+ // Get pointer to method
+ PRUint64 methodAddress = *((PRUint64 *)that);
+ methodAddress += 8 * methodIndex;
+ methodAddress = *((PRUint64 *)methodAddress);
+
+ typedef PRUint32 (*Method)(PRUint64, PRUint64, PRUint64, PRUint64, PRUint64, PRUint64);
+ PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5);
+ return result;
+}

213
icecat/patches/patch-xi Normal file
View file

@ -0,0 +1,213 @@
$NetBSD: patch-xi,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/amd64 xptcall support code. Originally from pkgsrc/www/mozilla.
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_amd64.cpp.orig 2009-06-30 22:20:24.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_amd64.cpp
@@ -0,0 +1,206 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+// Implement shared vtbl methods.
+
+#include "xptcprivate.h"
+
+// The Linux/x86-64 ABI passes the first 6 integral parameters and the
+// first 8 floating point parameters in registers (rdi, rsi, rdx, rcx,
+// r8, r9 and xmm0-xmm7), no stack space is allocated for these by the
+// caller. The rest of the parameters are passed in the callers stack
+// area.
+
+const PRUint32 PARAM_BUFFER_COUNT = 16;
+const PRUint32 GPR_COUNT = 6;
+const PRUint32 FPR_COUNT = 8;
+
+// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
+//
+// - 'args[]' contains the arguments passed on stack
+// - 'gpregs[]' contains the arguments passed in integer registers
+// - 'fpregs[]' contains the arguments passed in floating point registers
+//
+// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
+// and then the method gets called.
+
+extern "C" nsresult
+PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex,
+ PRUint64 * args, PRUint64 * gpregs, double *fpregs)
+{
+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
+ nsXPTCMiniVariant* dispatchParams = NULL;
+ nsIInterfaceInfo* iface_info = NULL;
+ const nsXPTMethodInfo* info;
+ PRUint32 paramCount;
+ PRUint32 i;
+ nsresult result = NS_ERROR_FAILURE;
+
+ NS_ASSERTION(self,"no self");
+
+ self->GetInterfaceInfo(&iface_info);
+ NS_ASSERTION(iface_info,"no interface info");
+ if (! iface_info)
+ return NS_ERROR_UNEXPECTED;
+
+ iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
+ NS_ASSERTION(info,"no method info");
+ if (! info)
+ return NS_ERROR_UNEXPECTED;
+
+ paramCount = info->GetParamCount();
+
+ // setup variant array pointer
+ if(paramCount > PARAM_BUFFER_COUNT)
+ dispatchParams = new nsXPTCMiniVariant[paramCount];
+ else
+ dispatchParams = paramBuffer;
+
+ NS_ASSERTION(dispatchParams,"no place for params");
+ if (! dispatchParams)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ PRUint64* ap = args;
+ PRUint32 nr_gpr = 1; // skip one GPR register for 'that'
+ PRUint32 nr_fpr = 0;
+ PRUint64 value;
+
+ for(i = 0; i < paramCount; i++) {
+ const nsXPTParamInfo& param = info->GetParam(i);
+ const nsXPTType& type = param.GetType();
+ nsXPTCMiniVariant* dp = &dispatchParams[i];
+
+ if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
+ if (nr_fpr < FPR_COUNT)
+ dp->val.d = fpregs[nr_fpr++];
+ else
+ dp->val.d = *(double*) ap++;
+ continue;
+ }
+ else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
+ if (nr_fpr < FPR_COUNT)
+ // The value in %xmm register is already prepared to
+ // be retrieved as a float. Therefore, we pass the
+ // value verbatim, as a double without conversion.
+ dp->val.d = *(double*) ap++;
+ else
+ dp->val.f = *(float*) ap++;
+ continue;
+ }
+ else {
+ if (nr_gpr < GPR_COUNT)
+ value = gpregs[nr_gpr++];
+ else
+ value = *ap++;
+ }
+
+ if (param.IsOut() || !type.IsArithmetic()) {
+ dp->val.p = (void*) value;
+ continue;
+ }
+
+ switch (type) {
+ case nsXPTType::T_I8: dp->val.i8 = (PRInt8) value; break;
+ case nsXPTType::T_I16: dp->val.i16 = (PRInt16) value; break;
+ case nsXPTType::T_I32: dp->val.i32 = (PRInt32) value; break;
+ case nsXPTType::T_I64: dp->val.i64 = (PRInt64) value; break;
+ case nsXPTType::T_U8: dp->val.u8 = (PRUint8) value; break;
+ case nsXPTType::T_U16: dp->val.u16 = (PRUint16) value; break;
+ case nsXPTType::T_U32: dp->val.u32 = (PRUint32) value; break;
+ case nsXPTType::T_U64: dp->val.u64 = (PRUint64) value; break;
+ case nsXPTType::T_BOOL: dp->val.b = (PRBool) value; break;
+ case nsXPTType::T_CHAR: dp->val.c = (char) value; break;
+ case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; break;
+
+ default:
+ NS_ASSERTION(0, "bad type");
+ break;
+ }
+ }
+
+ result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
+
+ NS_RELEASE(iface_info);
+
+ if (dispatchParams != paramBuffer)
+ delete [] dispatchParams;
+
+ return result;
+}
+
+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
+// Linux/x86-64 uses gcc >= 3.1
+#define STUB_ENTRY(n) \
+asm(".section \".text\"\n\t" \
+ ".align 2\n\t" \
+ ".if " #n " < 10\n\t" \
+ ".globl _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
+ ".type _ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n" \
+ "_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \
+ ".elseif " #n " < 100\n\t" \
+ ".globl _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
+ ".type _ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n" \
+ "_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \
+ ".elseif " #n " < 1000\n\t" \
+ ".globl _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
+ ".type _ZN14nsXPTCStubBase7Stub" #n "Ev,@function\n" \
+ "_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \
+ ".else\n\t" \
+ ".err \"stub number " #n " >= 1000 not yet supported\"\n\t" \
+ ".endif\n\t" \
+ "movl $" #n ", %eax\n\t" \
+ "jmp SharedStub\n\t" \
+ ".if " #n " < 10\n\t" \
+ ".size _ZN14nsXPTCStubBase5Stub" #n "Ev,.-_ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
+ ".elseif " #n " < 100\n\t" \
+ ".size _ZN14nsXPTCStubBase6Stub" #n "Ev,.-_ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
+ ".else\n\t" \
+ ".size _ZN14nsXPTCStubBase7Stub" #n "Ev,.-_ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
+ ".endif");
+
+// static nsresult SharedStub(PRUint32 methodIndex)
+asm(".section \".text\"\n\t"
+ ".align 2\n\t"
+ ".type SharedStub,@function\n\t"
+ "SharedStub:\n\t"
+ // make room for gpregs (48), fpregs (64)
+ "pushq %rbp\n\t"
+ "movq %rsp,%rbp\n\t"
+ "subq $112,%rsp\n\t"
+ // save GP registers
+ "movq %rdi,-112(%rbp)\n\t"
+ "movq %rsi,-104(%rbp)\n\t"
+ "movq %rdx, -96(%rbp)\n\t"
+ "movq %rcx, -88(%rbp)\n\t"
+ "movq %r8 , -80(%rbp)\n\t"
+ "movq %r9 , -72(%rbp)\n\t"
+ "leaq -112(%rbp),%rcx\n\t"
+ // save FP registers
+ "movsd %xmm0,-64(%rbp)\n\t"
+ "movsd %xmm1,-56(%rbp)\n\t"
+ "movsd %xmm2,-48(%rbp)\n\t"
+ "movsd %xmm3,-40(%rbp)\n\t"
+ "movsd %xmm4,-32(%rbp)\n\t"
+ "movsd %xmm5,-24(%rbp)\n\t"
+ "movsd %xmm6,-16(%rbp)\n\t"
+ "movsd %xmm7, -8(%rbp)\n\t"
+ "leaq -64(%rbp),%r8\n\t"
+ // rdi has the 'self' pointer already
+ "movl %eax,%esi\n\t"
+ "leaq 16(%rbp),%rdx\n\t"
+ "call PrepareAndDispatch\n\t"
+ "leave\n\t"
+ "ret\n\t"
+ ".size SharedStub,.-SharedStub");
+
+#define SENTINEL_ENTRY(n) \
+nsresult nsXPTCStubBase::Sentinel##n() \
+{ \
+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
+ return NS_ERROR_NOT_IMPLEMENTED; \
+}
+
+#include "xptcstubsdef.inc"
+
+#else
+#error "can't find a compiler to use"
+#endif /* __GNUC__ */

129
icecat/patches/patch-xj Normal file
View file

@ -0,0 +1,129 @@
$NetBSD: patch-xj,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp.orig 2009-06-29 18:15:33.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
@@ -41,6 +41,7 @@
// Implement shared vtbl methods.
#include "xptcprivate.h"
+#include "xptiprivate.h"
// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
// parameters and the first 8 floating point parameters in registers
@@ -71,7 +72,6 @@ PrepareAndDispatch(nsXPTCStubBase* self,
{
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
nsXPTCMiniVariant* dispatchParams = NULL;
- nsIInterfaceInfo* iface_info = NULL;
const nsXPTMethodInfo* info;
PRUint32 paramCount;
PRUint32 i;
@@ -79,12 +79,7 @@ PrepareAndDispatch(nsXPTCStubBase* self,
NS_ASSERTION(self,"no self");
- self->GetInterfaceInfo(&iface_info);
- NS_ASSERTION(iface_info,"no interface info");
- if (! iface_info)
- return NS_ERROR_UNEXPECTED;
-
- iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
NS_ASSERTION(info,"no method info");
if (! info)
return NS_ERROR_UNEXPECTED;
@@ -119,8 +114,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack
dp->val.d = *(double*) ap;
ap += 2;
+#if __GXX_ABI_VERSION < 100
if (gpr < GPR_COUNT)
gpr += 2;
+#endif
}
continue;
}
@@ -130,8 +127,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
else {
dp->val.f = *(float*) ap;
ap += 1;
+#if __GXX_ABI_VERSION < 100
if (gpr < GPR_COUNT)
gpr += 1;
+#endif
}
continue;
}
@@ -179,9 +178,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
}
}
- result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
-
- NS_RELEASE(iface_info);
+ result = self->mOuter->CallMethod((PRUint16) methodIndex,
+ info,
+ dispatchParams);
if (dispatchParams != paramBuffer)
delete [] dispatchParams;
@@ -195,7 +194,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
// however, it's quick, dirty, and'll break when the ABI changes on
// us, which is what we want ;-).
-#define STUB_ENTRY(n) \
+#if __GXX_ABI_VERSION < 100
+// gcc-2 version
+# define STUB_ENTRY(n) \
__asm__ ( \
".section \".text\" \n\t" \
".align 2 \n\t" \
@@ -206,6 +207,46 @@ __asm__ (
"li 11,"#n" \n\t" \
"b SharedStub@local \n" \
);
+#else
+// gcc-3 version
+//
+// As G++3 ABI contains the length of the functionname in the mangled
+// name, it is difficult to get a generic assembler mechanism like
+// in the G++ 2.95 case.
+// Create names would be like:
+// _ZN14nsXPTCStubBase5Stub1Ev
+// _ZN14nsXPTCStubBase6Stub12Ev
+// _ZN14nsXPTCStubBase7Stub123Ev
+// _ZN14nsXPTCStubBase8Stub1234Ev
+// etc.
+// Use assembler directives to get the names right...
+
+# define STUB_ENTRY(n) \
+__asm__ ( \
+ ".align 2 \n\t" \
+ ".if "#n" < 10 \n\t" \
+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
+ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
+"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
+ \
+ ".elseif "#n" < 100 \n\t" \
+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
+ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
+"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
+ \
+ ".elseif "#n" < 1000 \n\t" \
+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
+ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
+"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
+ \
+ ".else \n\t" \
+ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \
+ ".endif \n\t" \
+ \
+ "li 11,"#n" \n\t" \
+ "b SharedStub@local \n" \
+);
+#endif
#define SENTINEL_ENTRY(n) \
nsresult nsXPTCStubBase::Sentinel##n() \

156
icecat/patches/patch-xk Normal file
View file

@ -0,0 +1,156 @@
$NetBSD: patch-xk,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s.orig 2009-06-29 18:15:33.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s
@@ -1,43 +1,43 @@
-# -*- Mode: Asm -*-
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1999
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-# beard@netscape.com (Patrick Beard)
-# waterson@netscape.com (Chris Waterson)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
+// -*- Mode: Asm -*-
+//
+// ***** BEGIN LICENSE BLOCK *****
+// Version: MPL 1.1/GPL 2.0/LGPL 2.1
+//
+// The contents of this file are subject to the Mozilla Public License Version
+// 1.1 (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS" basis,
+// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+// for the specific language governing rights and limitations under the
+// License.
+//
+// The Original Code is mozilla.org code.
+//
+// The Initial Developer of the Original Code is
+// Netscape Communications Corporation.
+// Portions created by the Initial Developer are Copyright (C) 1999
+// the Initial Developer. All Rights Reserved.
+//
+// Contributor(s):
+// Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+// beard@netscape.com (Patrick Beard)
+// waterson@netscape.com (Chris Waterson)
+//
+// Alternatively, the contents of this file may be used under the terms of
+// either the GNU General Public License Version 2 or later (the "GPL"), or
+// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+// in which case the provisions of the GPL or the LGPL are applicable instead
+// of those above. If you wish to allow use of your version of this file only
+// under the terms of either the GPL or the LGPL, and not to allow others to
+// use your version of this file under the terms of the MPL, indicate your
+// decision by deleting the provisions above and replace them with the notice
+// and other provisions required by the GPL or the LGPL. If you do not delete
+// the provisions above, a recipient may use your version of this file under
+// the terms of any one of the MPL, the GPL or the LGPL.
+//
+// ***** END LICENSE BLOCK *****
.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
@@ -60,23 +60,23 @@
.type SharedStub,@function
SharedStub:
- stwu sp,-112(sp) # room for
- # linkage (8),
- # gprData (32),
- # fprData (64),
- # stack alignment(8)
+ stwu sp,-112(sp) // room for
+ // linkage (8),
+ // gprData (32),
+ // fprData (64),
+ // stack alignment(8)
mflr r0
- stw r0,116(sp) # save LR backchain
+ stw r0,116(sp) // save LR backchain
- stw r4,12(sp) # save GP registers
- stw r5,16(sp) # (n.b. that we don't save r3
- stw r6,20(sp) # because PrepareAndDispatch() is savvy)
+ stw r4,12(sp) // save GP registers
+ stw r5,16(sp) // (n.b. that we don't save r3
+ stw r6,20(sp) // because PrepareAndDispatch() is savvy)
stw r7,24(sp)
stw r8,28(sp)
stw r9,32(sp)
stw r10,36(sp)
- stfd f1,40(sp) # save FP registers
+ stfd f1,40(sp) // save FP registers
stfd f2,48(sp)
stfd f3,56(sp)
stfd f4,64(sp)
@@ -85,21 +85,21 @@ SharedStub:
stfd f7,88(sp)
stfd f8,96(sp)
- # r3 has the 'self' pointer already
+ // r3 has the 'self' pointer already
- mr r4,r11 # r4 <= methodIndex selector, passed
- # via r11 in the nsXPTCStubBase::StubXX() call
+ mr r4,r11 // r4 <= methodIndex selector, passed
+ // via r11 in the nsXPTCStubBase::StubXX() call
- addi r5,sp,120 # r5 <= pointer to callers args area,
- # beyond r3-r10/f1-f8 mapped range
+ addi r5,sp,120 // r5 <= pointer to callers args area,
+ // beyond r3-r10/f1-f8 mapped range
- addi r6,sp,8 # r6 <= gprData
- addi r7,sp,40 # r7 <= fprData
+ addi r6,sp,8 // r6 <= gprData
+ addi r7,sp,40 // r7 <= fprData
- bl PrepareAndDispatch@local # Go!
+ bl PrepareAndDispatch@local // Go!
- lwz r0,116(sp) # restore LR
+ lwz r0,116(sp) // restore LR
mtlr r0
- la sp,112(sp) # clean up the stack
+ la sp,112(sp) // clean up the stack
blr

200
icecat/patches/patch-xl Normal file
View file

@ -0,0 +1,200 @@
$NetBSD: patch-xl,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s.orig 2009-06-29 18:15:33.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s
@@ -1,43 +1,43 @@
-# -*- Mode: Asm -*-
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1999
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-# beard@netscape.com (Patrick Beard)
-# waterson@netscape.com (Chris Waterson)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
+// -*- Mode: Asm -*-
+//
+// ***** BEGIN LICENSE BLOCK *****
+// Version: MPL 1.1/GPL 2.0/LGPL 2.1
+//
+// The contents of this file are subject to the Mozilla Public License Version
+// 1.1 (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS" basis,
+// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+// for the specific language governing rights and limitations under the
+// License.
+//
+// The Original Code is mozilla.org code.
+//
+// The Initial Developer of the Original Code is
+// Netscape Communications Corporation.
+// Portions created by the Initial Developer are Copyright (C) 1999
+// the Initial Developer. All Rights Reserved.
+//
+// Contributor(s):
+// Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+// beard@netscape.com (Patrick Beard)
+// waterson@netscape.com (Chris Waterson)
+//
+// Alternatively, the contents of this file may be used under the terms of
+// either the GNU General Public License Version 2 or later (the "GPL"), or
+// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+// in which case the provisions of the GPL or the LGPL are applicable instead
+// of those above. If you wish to allow use of your version of this file only
+// under the terms of either the GPL or the LGPL, and not to allow others to
+// use your version of this file under the terms of the MPL, indicate your
+// decision by deleting the provisions above and replace them with the notice
+// and other provisions required by the GPL or the LGPL. If you do not delete
+// the provisions above, a recipient may use your version of this file under
+// the terms of any one of the MPL, the GPL or the LGPL.
+//
+// ***** END LICENSE BLOCK *****
.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
@@ -55,41 +55,41 @@
.section ".text"
.align 2
- .globl XPTC_InvokeByIndex
- .type XPTC_InvokeByIndex,@function
+ .globl NS_InvokeByIndex_P
+ .type NS_InvokeByIndex_P,@function
-#
-# XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-# PRUint32 paramCount, nsXPTCVariant* params)
-#
-
-XPTC_InvokeByIndex:
- stwu sp,-32(sp) # setup standard stack frame
- mflr r0 # save LR
- stw r3,8(sp) # r3 <= that
- stw r4,12(sp) # r4 <= methodIndex
+//
+// NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
+// PRUint32 paramCount, nsXPTCVariant* params)
+//
+
+NS_InvokeByIndex_P:
+ stwu sp,-32(sp) // setup standard stack frame
+ mflr r0 // save LR
+ stw r3,8(sp) // r3 <= that
+ stw r4,12(sp) // r4 <= methodIndex
stw r30,16(sp)
stw r31,20(sp)
- stw r0,36(sp) # store LR backchain
+ stw r0,36(sp) // store LR backchain
mr r31,sp
- rlwinm r10,r5,3,0,27 # r10 = (ParamCount * 2 * 4) & ~0x0f
- addi r0,r10,96 # reserve stack for GPR and FPR register save area r0 = r10 + 96
- lwz r9,0(sp) # r9 = backchain
+ rlwinm r10,r5,3,0,27 // r10 = (ParamCount * 2 * 4) & ~0x0f
+ addi r0,r10,96 // reserve stack for GPR and FPR register save area r0 = r10 + 96
+ lwz r9,0(sp) // r9 = backchain
neg r0,r0
- stwux r9,sp,r0 # reserve stack sapce and save SP backchain
+ stwux r9,sp,r0 // reserve stack sapce and save SP backchain
- addi r3,sp,8 # r3 <= args
- mr r4,r5 # r4 <= paramCount
- mr r5,r6 # r5 <= params
- add r6,r3,r10 # r6 <= gpregs ( == args + r10 )
- mr r30,r6 # store in r30 for use later...
- addi r7,r6,32 # r7 <= fpregs ( == gpregs + 32 )
+ addi r3,sp,8 // r3 <= args
+ mr r4,r5 // r4 <= paramCount
+ mr r5,r6 // r5 <= params
+ add r6,r3,r10 // r6 <= gpregs ( == args + r10 )
+ mr r30,r6 // store in r30 for use later...
+ addi r7,r6,32 // r7 <= fpregs ( == gpregs + 32 )
- bl invoke_copy_to_stack@local # (args, paramCount, params, gpregs, fpregs)
+ bl invoke_copy_to_stack@local // (args, paramCount, params, gpregs, fpregs)
- lfd f1,32(r30) # load FP registers with method parameters
+ lfd f1,32(r30) // load FP registers with method parameters
lfd f2,40(r30)
lfd f3,48(r30)
lfd f4,56(r30)
@@ -98,18 +98,13 @@ XPTC_InvokeByIndex:
lfd f7,80(r30)
lfd f8,88(r30)
- lwz r3,8(r31) # r3 <= that
- lwz r4,12(r31) # r4 <= methodIndex
- lwz r5,0(r3) # r5 <= vtable ( == *that )
- slwi r4,r4,3 # convert to offset ( *= 8 )
- addi r4,r4,8 # skip first two vtable entries
- add r4,r4,r5
- lhz r0,0(r4) # virtual base offset
- extsh r0,r0
- add r3,r3,r0
- lwz r0,4(r4) # r0 <= methodpointer ( == vtable + offset )
+ lwz r3,8(r31) // r3 <= that
+ lwz r4,12(r31) // r4 <= methodIndex
+ lwz r5,0(r3) // r5 <= vtable ( == *that )
+ slwi r4,r4,2 // convert to offset ( *= 4 )
+ lwzx r0,r4,r5 // r0 <= methodpointer ( == vtable + offset )
- lwz r4,4(r30) # load GP regs with method parameters
+ lwz r4,4(r30) // load GP regs with method parameters
lwz r5,8(r30)
lwz r6,12(r30)
lwz r7,16(r30)
@@ -117,13 +112,13 @@ XPTC_InvokeByIndex:
lwz r9,24(r30)
lwz r10,28(r30)
- mtlr r0 # copy methodpointer to LR
- blrl # call method
+ mtlr r0 // copy methodpointer to LR
+ blrl // call method
- lwz r30,16(r31) # restore r30 & r31
+ lwz r30,16(r31) // restore r30 & r31
lwz r31,20(r31)
- lwz r11,0(sp) # clean up the stack
+ lwz r11,0(sp) // clean up the stack
lwz r0,4(r11)
mtlr r0
mr sp,r11

49
icecat/patches/patch-xm Normal file
View file

@ -0,0 +1,49 @@
$NetBSD: patch-xm,v 1.1 2009/09/11 14:01:19 yhardy Exp $
NetBSD/ppc xptcall support code. Originally from pkgsrc/www/mozilla.
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp.orig 2009-06-29 18:15:33.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
@@ -40,9 +40,9 @@
// Platform specific code to invoke XPCOM methods on native objects
-// The purpose of XPTC_InvokeByIndex() is to map a platform
+// The purpose of NS_InvokeByIndex_P() is to map a platform
// indepenpent call to the platform ABI. To do that,
-// XPTC_InvokeByIndex() has to determine the method to call via vtable
+// NS_InvokeByIndex_P() has to determine the method to call via vtable
// access. The parameters for the method are read from the
// nsXPTCVariant* and prepared for the native ABI. For the Linux/PPC
// ABI this means that the first 8 integral and floating point
@@ -104,8 +104,10 @@ invoke_copy_to_stack(PRUint32* d,
if ((PRUint32) d & 4) d++; // doubles are 8-byte aligned on stack
*((double*) d) = s->val.d;
d += 2;
+#if __GXX_ABI_VERSION < 100
if (gpr < GPR_COUNT)
gpr += 2;
+#endif
}
}
else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
@@ -114,8 +116,10 @@ invoke_copy_to_stack(PRUint32* d,
else {
*((float*) d) = s->val.f;
d += 1;
+#if __GXX_ABI_VERSION < 100
if (gpr < GPR_COUNT)
gpr += 1;
+#endif
}
}
else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64
@@ -142,6 +146,6 @@ invoke_copy_to_stack(PRUint32* d,
}
extern "C"
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+EXPORT_XPCOM_API(nsresult)
+NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params);