[RFC] Port for nspluginwrapper

Dave Grochowski malus.x at gmail.com
Wed Apr 4 00:31:54 UTC 2007


Hey,

Jung-uk Kim wrote:
> On Tuesday 03 April 2007 05:58 am, Rong-en Fan wrote:
>   
>> On 3/31/07, Dave Grochowski <malus.x at gmail.com> wrote:
>>     
>>> Hey all,
>>>
>>> I wrote a port for nspluginwrapper, which you can find at:
>>>
>>> http://elvis.rowan.edu/~grocho98/nspluginwrapper.tar.bz2
>>>
>>> For those who do not know what it is, you can find the homepage
>>> at:
>>>
>>> http://gwenole.beauchesne.info/projects/nspluginwrapper/
>>>       
>> I polished the port a little bit:
>>
>> http://people.freebsd.org/~rafan/nspluginwrapper.shar
>>
>> It includes 1) installing to LOCALBASE 2) correct pkg-plist on
>> amd64, and 3) correct dependency.
>>
>> Can someone please verify this port still works on i386? Thanks!
>>
>> BTW, anyone tried on amd64? I can not get it work. It seems that
>> it dlopen(3) the plugin .so then it fails... I'm wondering why it
>> works on i386.
>>     
>
> Here is a patch for amd64:
>
> http://people.freebsd.org/~jkim/patch-src-sysdeps.h
>
> I just briefly tested with Linux Flash plugin and it seems working 
> correctly.
>
> Jung-uk Kim
>
>   
Actually, the configure script has some Linuxisms in it for the arch 
detection. Try the attached patch and see if that fixes the problem.

Sincerely,
Dave Grochowski
-------------- next part --------------
--- configure.orig	Sun Mar  4 10:01:22 2007
+++ configure	Tue Apr  3 20:13:44 2007
@@ -6,13 +6,8 @@
 PACKAGE=nspluginwrapper
 
 # set temporary file name
-if test ! -z "$TMPDIR" ; then
-    TMPDIR1="${TMPDIR}"
-elif test ! -z "$TEMPDIR" ; then
-    TMPDIR1="${TEMPDIR}"
-else
-    TMPDIR1="/tmp"
-fi
+mkdir -p tmp
+TMPDIR1="./tmp"
 
 TMPC="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.c"
 TMPO="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.o"
@@ -51,7 +46,7 @@
     host_cpu="sparc64"
     ;;
 x86_64|amd64)
-    host_cpu="x86_64"
+    host_cpu="amd64"
     ;;
 *)
     host_cpu="unknown"
@@ -75,6 +70,9 @@
 --prefix=*)
     prefix=`echo $opt | cut -d '=' -f 2`
     ;;
+--x11=*)
+    x_base_dirs=`echo $opt | cut -d '=' -f 2`
+    ;;
 --pkglibdir=*)
     pkglibdir=`echo $opt | cut -d '=' -f 2`
     ;;
@@ -114,7 +112,7 @@
 # check for biarch build
 if test "$biarch" = "guess"; then
     case $host_cpu:$target_cpu in
-    x86_64:i386 | ppc64:ppc)
+    amd64:i386 | ppc64:ppc)
 	biarch="yes"
 	;;
     *)
@@ -153,7 +151,7 @@
 	;;
     esac
     case $host_cpu:$nspluginwrapper_64bit_output in
-    ppc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+    ppc64:yes | s390x:yes | sparc64:yes | amd64:yes)
 	lib64="lib64"
 	;;
     *)
@@ -279,10 +277,12 @@
 fi
 
 # check for X11 base dir
-x_base_dirs='
-/usr
-/usr/X11R6
-/usr/local/X11R6'
+if test -z "$x_base_dirs"; then
+	x_base_dirs='
+	/usr
+	/usr/X11R6
+	/usr/local'
+fi
 for dir in $x_base_dirs; do
     x_include_dir="$dir/include"
     if test -f $x_include_dir/X11/Intrinsic.h; then
@@ -407,6 +407,7 @@
 echo "  --target-os=OS              build plugin support for target OS [$target_os]"
 echo "  --target-cpu=CPU            build plugin support for target CPU [$target_cpu]"
 echo "  --with-viewer               build viewer [$build_viewer]"
+echo "  --x11=PREFIX                path to X11 base"
 echo ""
 echo "Advanced options (experts only):"
 echo "  --source-path=PATH          path of source code [$source_path]"
@@ -474,10 +475,10 @@
     echo "ARCH=i386" >> $config_mak
     echo "#define HOST_I386 1" >> $config_h
     echo "#define HOST_ARCH \"i386\"" >> $config_h
-elif test "$host_cpu" = "x86_64" ; then
-    echo "ARCH=x86_64" >> $config_mak
+elif test "$host_cpu" = "amd64" ; then
+    echo "ARCH=amd64" >> $config_mak
     echo "#define HOST_X86_64 1" >> $config_h
-    echo "#define HOST_ARCH \"x86_64\"" >> $config_h
+    echo "#define HOST_ARCH \"amd64\"" >> $config_h
 elif test "$host_cpu" = "ppc" ; then
     echo "ARCH=ppc" >> $config_mak
     echo "#define HOST_PPC 1" >> $config_h


More information about the freebsd-emulation mailing list