Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 195765 | Differences between
and this patch

Collapse All | Expand All

(-)old/php5_2-sapi.eclass (-14 / +14 lines)
Lines 229-244 Link Here
229
}
229
}
230
230
231
php5_2-sapi_set_php_ini_dir() {
231
php5_2-sapi_set_php_ini_dir() {
232
	PHP_INI_DIR="/etc/php/${PHPSAPI}-php5"
232
	PHP_INI_DIR="${EPREFIX}/etc/php/${PHPSAPI}-php5"
233
	PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
233
	PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
234
	PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
234
	PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
235
}
235
}
236
236
237
php5_2-sapi_install_ini() {
237
php5_2-sapi_install_ini() {
238
	destdir=/usr/$(get_libdir)/php5
238
	destdir="${EPREFIX}"/usr/$(get_libdir)/php5
239
239
240
	# get the extension dir, if not already defined
240
	# get the extension dir, if not already defined
241
	[[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${ED}/${destdir}/bin/php-config" --extension-dir`"
241
	[[ -z "${PHPEXTDIR}" ]] && PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`"
242
242
243
	# work out where we are installing the ini file
243
	# work out where we are installing the ini file
244
	php5_2-sapi_set_php_ini_dir
244
	php5_2-sapi_set_php_ini_dir
Lines 256-262 Link Here
256
256
257
	# Set the include path to point to where we want to find PEAR packages
257
	# Set the include path to point to where we want to find PEAR packages
258
	einfo "Setting correct include_path"
258
	einfo "Setting correct include_path"
259
	sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php5:/usr/share/php"|' -i ${phpinisrc}
259
	sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:${EPREFIX}/usr/share/php5:${EPREFIX}/usr/share/php"|' -i ${phpinisrc}
260
260
261
	# Add needed MySQL extensions charset configuration
261
	# Add needed MySQL extensions charset configuration
262
	local phpmycnfcharset=""
262
	local phpmycnfcharset=""
Lines 289-308 Link Here
289
		echo ";pdo_mysql.connect_charset = utf8" >> ${phpinisrc}
289
		echo ";pdo_mysql.connect_charset = utf8" >> ${phpinisrc}
290
	fi
290
	fi
291
291
292
	dodir ${PHP_INI_DIR}
292
	dodir ${PHP_INI_DIR#${EPREFIX}}
293
	insinto ${PHP_INI_DIR}
293
	insinto ${PHP_INI_DIR#${EPREFIX}}
294
	newins ${phpinisrc} ${PHP_INI_FILE}
294
	newins ${phpinisrc} ${PHP_INI_FILE}
295
295
296
	dodir ${PHP_EXT_INI_DIR}
296
	dodir ${PHP_EXT_INI_DIR#${EPREFIX}}
297
	dodir ${PHP_EXT_INI_DIR_ACTIVE}
297
	dodir ${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}
298
298
299
	# Install any extensions built as shared objects
299
	# Install any extensions built as shared objects
300
	if use sharedext ; then
300
	if use sharedext ; then
301
		for x in `ls "${ED}/${PHPEXTDIR}/"*.so | sort` ; do
301
		for x in `ls "${D}/${PHPEXTDIR}/"*.so | sort` ; do
302
			inifilename=${x/.so/.ini}
302
			inifilename=${x/.so/.ini}
303
			inifilename=`basename ${inifilename}`
303
			inifilename=`basename ${inifilename}`
304
			echo "extension=`basename ${x}`" >> "${ED}/${PHP_EXT_INI_DIR}/${inifilename}"
304
			echo "extension=`basename ${x}`" >> "${D}/${PHP_EXT_INI_DIR}/${inifilename}"
305
			dosym "${PHP_EXT_INI_DIR}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE}/${inifilename}"
305
			dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/${inifilename}" "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/${inifilename}"
306
		done
306
		done
307
	fi
307
	fi
308
}
308
}
Lines 408-414 Link Here
408
# Takes care of compiling php according to USE flags set by user (and those automagically
408
# Takes care of compiling php according to USE flags set by user (and those automagically
409
# enabled via phpconfutils eclass if unavoidable).
409
# enabled via phpconfutils eclass if unavoidable).
410
php5_2-sapi_src_compile() {
410
php5_2-sapi_src_compile() {
411
	destdir=/usr/$(get_libdir)/php5
411
	destdir="${EPREFIX}"/usr/$(get_libdir)/php5
412
412
413
	php5_2-sapi_set_php_ini_dir
413
	php5_2-sapi_set_php_ini_dir
414
414
Lines 637-643 Link Here
637
	tc-export CC
637
	tc-export CC
638
638
639
	# We don't use econf, because we need to override all of its settings
639
	# We don't use econf, because we need to override all of its settings
640
	./configure --prefix="${EPREFIX}"${destdir} --host=${CHOST} --mandir="${EPREFIX}"${destdir}/man --infodir="${EPREFIX}"${destdir}/info --sysconfdir="${EPREFIX}"/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed"
640
	./configure --prefix=${destdir} --host=${CHOST} --mandir=${destdir}/man --infodir=${destdir}/info --sysconfdir="${EPREFIX}"/etc --cache-file=./config.cache ${my_conf} ${EXTRA_ECONF} || die "configure failed"
641
	emake || die "make failed"
641
	emake || die "make failed"
642
}
642
}
643
643
Lines 684-690 Link Here
684
		for x in `ls "${S}/modules/"*.so | sort` ; do
684
		for x in `ls "${S}/modules/"*.so | sort` ; do
685
			module=`basename ${x}`
685
			module=`basename ${x}`
686
			modulename=${module/.so/}
686
			modulename=${module/.so/}
687
			insinto "${PHPEXTDIR}"
687
			insinto "${PHPEXTDIR#${EPREFIX}}"
688
			einfo "Installing PHP ${modulename} extension"
688
			einfo "Installing PHP ${modulename} extension"
689
			doins "modules/${module}"
689
			doins "modules/${module}"
690
		done
690
		done

Return to bug 195765