Magellan Linux

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

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

revision 1974 by niro, Thu Nov 15 10:46:58 2012 UTC revision 1978 by niro, Thu Nov 15 11:55:31 2012 UTC
# Line 241  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 249  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 269  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 303  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 325  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   headers[GL]="gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxproto.h"
329   pushd ${DST_PREFIX}/include/GL &> /dev/null   headers[GLES]="egl.h gl_extensions.h glext.h gl.h glplatform.h"
330   for file in gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxproto.h   headers[GLES2]="gl2ext.h gl2.h gl2platform.h"
331   do   headers[EGL]="eglext.h egl.h eglplatform.h"
332   # IMPORTANT   headers[KHR]="khrplatform.h"
333   # It is preferable currently to use the standard glext.h file   headers[VG]="openvg.h vgext.h vgplatform.h vgu.h"
334   # however if an OpenGL provider must use a self produced glext.h   for incl_dir in EGL GL GLES GLES2 KHR VG
335   # then it should be installed to ${GL_IMPLEM}/include and the user   do
336   # can add the --impl-headers option to select it.   mkdir -p ${DST_PREFIX}/include/${incl_dir}
337     pushd ${DST_PREFIX}/include/${incl_dir} &> /dev/null
338     for file in ${headers[${incl_dir}]}
339     do
340     # IMPORTANT
341     # It is preferable currently to use the standard glext.h file
342     # however if an OpenGL provider must use a self produced glext.h
343     # then it should be installed to ${GL_IMPLEM}/include and the user
344     # can add the --impl-headers option to select it.
345     if [[ ${USE_PROFILE_HEADERS} = yes ]]
346     then
347     # Check the profile first.
348     if [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file} ]]
349     then
350     [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
351     ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file}
352     fi
353     continue
354     fi
355    
356   if [[ ${USE_PROFILE_HEADERS} = yes ]]   if [[ -e ${PREFIX}/${LIBDIR}/opengl/global/include/${incl_dir}/${file} ]]
  then  
  # Check the profile first.  
  if [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file} ]]  
357   then   then
358   [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}   [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
359   ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file}   ln -s ${PREFIX}/${LIBDIR}/opengl/global/include/${incl_dir}/${file}
360     elif [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file} ]]
361     then
362     [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
363     ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file}
364     elif [[ -e ${PREFIX}/${LIBDIR}/opengl/xorg/include/${incl_dir}/${file} ]]
365     then
366     [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file}
367     ln -s ${PREFIX}/${LIBDIR}/opengl/xorg/include/${incl_dir}/${file}
368   fi   fi
369   continue   done
370   fi   popd &> /dev/null
371     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  
372    
373   # Setup the $LDPATH   # Setup the $LDPATH
374   ldpath="${ldpath:+${ldpath}:}${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib"   ldpath="${ldpath:+${ldpath}:}${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib"

Legend:
Removed from v.1974  
changed lines
  Added in v.1978