Magellan Linux

Diff of /tags/openglupdate-2_3_6/opengl-update.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/opengl-update/opengl-update.sh revision 633 by niro, Wed Nov 14 19:19:16 2007 UTC trunk/opengl-update/opengl-update.in revision 1999 by niro, Mon Dec 31 15:06:03 2012 UTC
# Line 11  Line 11 
11  # <niro@magellan-linux.de>  # <niro@magellan-linux.de>
12  #  #
13    
 . /etc/init.d/functions  
   
14  hasq()  hasq()
15  {  {
16   local x   local x
# Line 243  set_new_implementation() Line 241  set_new_implementation()
241   mkdir -p ${DST_PREFIX}/${LIBDIR}   mkdir -p ${DST_PREFIX}/${LIBDIR}
242   pushd ${DST_PREFIX}/${LIBDIR} &> /dev/null   pushd ${DST_PREFIX}/${LIBDIR} &> /dev/null
243   # First remove old symlinks   # First remove old symlinks
244   for file in libGL{,core}.{a,so,la}   for file in lib{EGL,GL*,OpenVG}{,core}.{so,dylib,a,la}
245   do   do
246   [[ -h ${file} ]] && rm -f ${file}   [[ -h ${file} ]] && rm -f ${file}
247   done   done
# Line 251  set_new_implementation() Line 249  set_new_implementation()
249   # Note that we don't do .so*, just .so on purpose.  The   # Note that we don't do .so*, just .so on purpose.  The
250   # loader knows to look in the profile dir, and the   # loader knows to look in the profile dir, and the
251   # linked just needs the .so   # linked just needs the .so
252   for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/libGL{,core}.{so,a,la}   for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/lib{EGL,GL*,OpenVG}{,core}.{so,dylib,a,la}
253   do   do
254   [[ -f ${file} ]] || continue   [[ -f ${file} ]] || continue
255   [[ -f ${file##*/} ]] && rm -f ${file##*/}   [[ -f ${file##*/} ]] && rm -f ${file##*/}
# Line 271  set_new_implementation() Line 269  set_new_implementation()
269   mkdir -p ${DST_PREFIX}/${LIBDIR}/tls   mkdir -p ${DST_PREFIX}/${LIBDIR}/tls
270   pushd ${DST_PREFIX}/${LIBDIR}/tls &> /dev/null   pushd ${DST_PREFIX}/${LIBDIR}/tls &> /dev/null
271   # First remove old symlinks   # First remove old symlinks
272   for file in libGL{,core}.{a,so,la}   for file in lib{EGL,GL*,OpenVG}{,core}.{so,dylib,a,la}
273   do   do
274   [[ -h ${file} ]] && rm -f ${file}   [[ -h ${file} ]] && rm -f ${file}
275   done   done
276    
277   for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls/libGL{,core}.{so,a,la}   for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls/lib{EGL,GL*,OpenVG}{,core}.{so,dylib,a,la}
278   do   do
279   [[ -f ${file} ]] || continue   [[ -f ${file} ]] || continue
280   [[ -f ${file##*/} ]] && rm -f ${file##*/}   [[ -f ${file##*/} ]] && rm -f ${file##*/}
# Line 305  set_new_implementation() Line 303  set_new_implementation()
303   mkdir -p ${DST_PREFIX}/${LIBDIR}/${MODULEDIR}/extensions   mkdir -p ${DST_PREFIX}/${LIBDIR}/${MODULEDIR}/extensions
304   pushd ${DST_PREFIX}/${LIBDIR}/${MODULEDIR}/extensions &> /dev/null   pushd ${DST_PREFIX}/${LIBDIR}/${MODULEDIR}/extensions &> /dev/null
305   # First remove old symlinks   # First remove old symlinks
306   for file in libglx.so libglx.a   for file in lib{wfb,glx,dri,dri2}.{so,dylib,a}
307   do   do
308   [[ -h ${file} ]] && rm -f ${file}   [[ -h ${file} ]] && rm -f ${file}
309   done   done
# Line 327  set_new_implementation() Line 325  set_new_implementation()
325   fi   fi
326    
327   # Setup the includes   # Setup the includes
328   mkdir -p ${DST_PREFIX}/include/GL   local -A headers
329   pushd ${DST_PREFIX}/include/GL &> /dev/null   headers[GL]="gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxproto.h glu.h glu_mangle.h"
330   for file in gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxproto.h   headers[GLES]="egl.h gl_extensions.h glext.h gl.h glplatform.h"
331   do   headers[GLES2]="gl2ext.h gl2.h gl2platform.h"
332   # IMPORTANT   headers[EGL]="eglext.h egl.h eglmesaext.h eglplatform.h"
333   # It is preferable currently to use the standard glext.h file   headers[KHR]="khrplatform.h"
334   # however if an OpenGL provider must use a self produced glext.h   headers[VG]="openvg.h vgext.h vgplatform.h vgu.h"
335   # then it should be installed to ${GL_IMPLEM}/include and the user   for incl_dir in EGL GL GLES GLES2 KHR VG
336   # can add the --impl-headers option to select it.   do
337     mkdir -p ${DST_PREFIX}/include/${incl_dir}
338     pushd ${DST_PREFIX}/include/${incl_dir} &> /dev/null
339     for file in ${headers[${incl_dir}]}
340     do
341     # IMPORTANT
342     # It is preferable currently to use the standard glext.h file
343     # however if an OpenGL provider must use a self produced glext.h
344     # then it should be installed to ${GL_IMPLEM}/include and the user
345     # can add the --impl-headers option to select it.
346     if [[ ${USE_PROFILE_HEADERS} = yes ]]
347     then
348     # Check the profile first.
349     if [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file} ]]
350     then
351     [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
352     ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file}
353     fi
354     continue
355     fi
356    
357   if [[ ${USE_PROFILE_HEADERS} = yes ]]   if [[ -e ${PREFIX}/${LIBDIR}/opengl/global/include/${incl_dir}/${file} ]]
358   then   then
359   # Check the profile first.   [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
360   if [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file} ]]   ln -s ${PREFIX}/${LIBDIR}/opengl/global/include/${incl_dir}/${file}
361     elif [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file} ]]
362     then
363     [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
364     ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file}
365     elif [[ -e ${PREFIX}/${LIBDIR}/opengl/xorg/include/${incl_dir}/${file} ]]
366   then   then
367   [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}   [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
368   ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file}   ln -s ${PREFIX}/${LIBDIR}/opengl/xorg/include/${incl_dir}/${file}
369   fi   fi
370   continue   done
371   fi   popd &> /dev/null
372     done
  if [[ -e ${PREFIX}/${LIBDIR}/opengl/global/include/${file} ]]  
  then  
  [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}  
  ln -s ${PREFIX}/${LIBDIR}/opengl/global/include/${file}  
  elif [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file} ]]  
  then  
  [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}  
  ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file}  
  elif [[ -e ${PREFIX}/${LIBDIR}/opengl/xorg/include/${file} ]]  
  then  
  [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}  
  ln -s ${PREFIX}/${LIBDIR}/opengl/xorg/include/${file}  
  fi  
  done  
  popd &> /dev/null  
373    
374   # Setup the $LDPATH   # Setup the $LDPATH
375   ldpath="${ldpath:+${ldpath}:}${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib"   ldpath="${ldpath:+${ldpath}:}${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib"

Legend:
Removed from v.633  
changed lines
  Added in v.1999