Сравнение ogre-1.9.0-r3 с ogre-1.12.9-r3

/usr/portage/dev-games/ogre/ogre-1.12.9-r3.ebuild 2023-10-09 14:52:29.364368347 +0300
4 4
EAPI=7
5 5

  
6 6
CMAKE_REMOVE_MODULES_LIST="FindFreetype FindDoxygen FindZLIB"
7
inherit cmake
7 8

  
8
inherit cmake flag-o-matic vcs-snapshot
9
IMGUI_PN="imgui"
10
IMGUI_PV="1.77"
11
IMGUI_P="${IMGUI_PN}-${IMGUI_PV}"
9 12

  
10 13
DESCRIPTION="Object-oriented Graphics Rendering Engine"
11 14
HOMEPAGE="https://www.ogre3d.org/"
12
SRC_URI="https://bitbucket.org/sinbad/ogre/get/v${PV//./-}.tar.bz2 -> ${P}.tar.bz2"
15
SRC_URI="https://github.com/OGRECave/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
16
	https://github.com/ocornut/${IMGUI_PN}/archive/v${IMGUI_PV}.tar.gz -> ${IMGUI_P}.tar.gz"
13 17

  
14 18
LICENSE="MIT public-domain"
15
SLOT="0/1.9.0"
16
KEYWORDS="amd64 ~arm x86"
19
SLOT="0/1.12"
20
KEYWORDS="~amd64 ~arm ~x86"
17 21

  
18
# gles1 currently broken wrt bug #418201
19
# gles1 does not even build wrt bug #506058
20
IUSE="+boost cg doc double-precision examples +freeimage gl3plus gles2 gles3 ois +opengl poco profile tbb threads tools +zip"
21

  
22
REQUIRED_USE="threads? ( ^^ ( boost poco tbb ) )
23
	examples? ( ois )
24
	poco? ( threads )
25
	tbb? ( threads )
26
	gl3plus? ( !gles2 !gles3 )
27
	gles3? ( gles2 )
28
	gl3plus? ( opengl )"
22
IUSE="assimp +cache cg debug deprecated doc double-precision egl examples +freeimage
23
	json +opengl pch profile resman-pedantic tools"
24

  
25
# Note: gles2 USE flag taken out for now. It seems like the Ogre Devs now rely
26
#       on HLSL2GLSL (https://github.com/aras-p/hlsl2glslfork) unconditionally
27
#       for GLES2. So unless we have an ebuild for that, gles2/3 are off the
28
#       table.
29
#       ~~sed 2020-04-26 (yamakuzure@gmx.net)
30
#
31
# Note: Without gles2 USE flag, the opengl USE flag is next to useless. But
32
#       there are packages which enforce it, so it has to stay.
33
#
34
# USE="gles2"
35
# REQUIRED_USE="
36
# 	|| ( gles2 opengl )
37
# "
38
REQUIRED_USE="
39
	examples? ( opengl )
40
"
29 41

  
30 42
RESTRICT="test" #139905
31 43

  
32 44
RDEPEND="
45
	dev-games/ois
46
	dev-libs/pugixml
47
	dev-libs/zziplib
33 48
	media-libs/freetype:2
34
	virtual/opengl
35
	virtual/glu
36 49
	x11-libs/libX11
37 50
	x11-libs/libXaw
38 51
	x11-libs/libXrandr
39 52
	x11-libs/libXt
40
	boost? ( dev-libs/boost:= )
53
	assimp? ( media-libs/assimp:= )
41 54
	cg? ( media-gfx/nvidia-cg-toolkit )
55
	egl? ( media-libs/mesa[egl(+)] )
42 56
	freeimage? ( media-libs/freeimage )
43
	gles2? ( >=media-libs/mesa-9.0.0[gles2] )
44
	gles3? ( >=media-libs/mesa-10.0.0[gles2] )
45
	gl3plus? ( >=media-libs/mesa-9.2.5 )
46
	ois? ( dev-games/ois )
47
	threads? (
48
		poco? ( dev-libs/poco )
49
		tbb? ( dev-cpp/tbb:= )
57
	json? ( dev-libs/rapidjson )
58
	opengl? (
59
		virtual/glu
60
		virtual/opengl
50 61
	)
51 62
	tools? ( dev-libs/tinyxml[stl] )
52
	zip? ( sys-libs/zlib dev-libs/zziplib )"
63
"
64
# 	gles2? ( media-libs/mesa[gles2] )
53 65
DEPEND="
54 66
	${RDEPEND}
55 67
	x11-base/xorg-proto
......
60 72
"
61 73

  
62 74
PATCHES=(
63
	"${FILESDIR}/${P}-remove_resource_path_to_bindir.patch"
64
	"${FILESDIR}/${P}-remove_media_path_to_bindir.patch"
65
	"${FILESDIR}/${P}-gcc52.patch"
66
	"${FILESDIR}/${P}-samples.patch"
75
	"${FILESDIR}"/${P}-media_path.patch
76
	"${FILESDIR}"/${P}-resource_path.patch
77
	"${FILESDIR}"/${P}-fix_Simple_demo.patch
78
	"${FILESDIR}"/${P}-gentoolize_imgui_inclusion.patch
79
	"${FILESDIR}"/${P}-fix_config_window_height.patch
80
	"${FILESDIR}"/${PN}-1.10.12-use_system_tinyxml.patch
67 81
)
68 82

  
83
src_unpack() {
84
	unpack ${P}.tar.gz || die "Unpacking ${P}.zip failed"
85

  
86
	# Ogre 1.12.9 includes imgui, but as a submodule, it is not included
87
	# in the release. The build system tries to download it, that may
88
	# fail and so we are doing it ourselves.
89
	cd "${S}" || die "Unpack incomplete"
90
	unpack ${IMGUI_P}.tar.gz || die "Unpacking ${IMGUI_P}.zip failed"
91
}
92

  
69 93
src_prepare() {
94
	local broken_png=(
95
		Icon@2x-72.png
96
		Default-Portrait~ipad.png
97
		Default-Portrait@2x~ipad.png
98
		Default-Landscape@2x~ipad.png
99
	)
100

  
70 101
	sed -i \
71
		-e "s:share/OGRE/docs:share/doc/${PF}:" \
102
		-e "s:share/doc/OGRE:share/doc/${PF}:" \
72 103
		Docs/CMakeLists.txt || die
73
	# Stupid build system hardcodes release names
104
	# In this series, the CMAKE_BUILD_TARGET is hard-wired to the
105
	# installation. And only Debug, MinSizeRel and RelWithDebInfo
106
	# are supported.
74 107
	sed -i \
75
		-e '/CONFIGURATIONS/s:CONFIGURATIONS Release.*::' \
76
		CMake/Utils/OgreConfigTargets.cmake || die
77

  
78
	# make sure we're not using the included tinyxml
79
	rm -f Tools/XMLConverter/{include,src}/tiny*.*
108
		-e "s/$(usex debug Debug Release)/Gentoo/g" \
109
		CMake/InstallResources.cmake \
110
		CMake/Utils/OgreConfigTargets.cmake \
111
		|| die
112

  
113
	# Fix broken png files
114
	einfo "Fixing broken png files."
115
	pushd "${S}"/Samples/Common/misc 1>/dev/null 2>&1
116
	for png in "${broken_png[@]}"; do
117
		pngfix -q --out=out.png ${png}
118
		mv -f out.png "${png}" || die
119
	done
120
	popd 1>/dev/null 2>&1
121
	einfo "done ..."
80 122

  
81 123
	# Fix some path issues
82 124
	cmake_src_prepare
......
84 126

  
85 127
src_configure() {
86 128
	local mycmakeargs=(
87
		-DOGRE_FULL_RPATH=NO
88
		-DOGRE_USE_BOOST=$(usex boost)
129
		-DCMAKE_SKIP_INSTALL_RPATH=yes
130
		-DOGRE_BUILD_COMPONENT_BITES=yes
131
		-DOGRE_BUILD_COMPONENT_CSHARP=no
132
		-DOGRE_BUILD_COMPONENT_HLMS=$(usex deprecated)
133
		-DOGRE_BUILD_COMPONENT_JAVA=no
134
		-DOGRE_BUILD_COMPONENT_OVERLAY=yes
135
		-DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=yes
136
		-DOGRE_BUILD_COMPONENT_PAGING=yes
137
		-DOGRE_BUILD_COMPONENT_PROPERTY=yes
138
		-DOGRE_BUILD_COMPONENT_PYTHON=no
139
		-DOGRE_BUILD_COMPONENT_RTSHADERSYSTEM=yes
140
		-DOGRE_BUILD_COMPONENT_TERRAIN=yes
141
		-DOGRE_BUILD_COMPONENT_VOLUME=yes
142
		-DOGRE_BUILD_DEPENDENCIES=no
89 143
		-DOGRE_BUILD_PLUGIN_CG=$(usex cg)
90
		-DOGRE_INSTALL_DOCS=$(usex doc)
91
		-DOGRE_CONFIG_DOUBLE=$(usex double-precision)
92
		-DOGRE_CONFIG_ENABLE_FREEIMAGE=$(usex freeimage)
144
		-DOGRE_BUILD_PLUGIN_FREEIMAGE=$(usex freeimage)
145
		-DOGRE_BUILD_PLUGIN_EXRCODEC=no
93 146
		-DOGRE_BUILD_RENDERSYSTEM_GL=$(usex opengl)
94
		-DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=$(usex gl3plus)
95
		-DOGRE_BUILD_RENDERSYSTEM_GLES=FALSE
96
		-DOGRE_BUILD_RENDERSYSTEM_GLES2=$(usex gles2)
97
		-DOGRE_CONFIG_ENABLE_GLES3_SUPPORT=$(usex gles3)
98
		-DOGRE_PROFILING=$(usex profile)
147
		-DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=$(usex opengl)
148
		-DOGRE_BUILD_RENDERSYSTEM_GLES2=no
99 149
		-DOGRE_BUILD_SAMPLES=$(usex examples)
150
		-DOGRE_BUILD_TESTS=no
151
		-DOGRE_BUILD_TOOLS=$(usex tools)
152
		-DOGRE_CONFIG_DOUBLE=$(usex double-precision)
153
		-DOGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT=$(usex cache)
154
		-DOGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT=no
155
		-DOGRE_CONFIG_ENABLE_GLES3_SUPPORT=no
156
		-DOGRE_CONFIG_THREADS=3
157
		-DOGRE_CONFIG_THREAD_PROVIDER=std
158
		-DOGRE_ENABLE_PRECOMPILED_HEADERS=$(usex pch)
159
		-DOGRE_INSTALL_DOCS=$(usex doc)
100 160
		-DOGRE_INSTALL_SAMPLES=$(usex examples)
101 161
		-DOGRE_INSTALL_SAMPLES_SOURCE=$(usex examples)
102
		-DOGRE_BUILD_TESTS=FALSE
103
		-DOGRE_CONFIG_THREADS=$(usex threads 2 0)
104
		-DOGRE_BUILD_TOOLS=$(usex tools)
105
		-DOGRE_CONFIG_ENABLE_ZIP=$(usex zip)
162
		-DOGRE_NODELESS_POSITIONING=$(usex deprecated)
163
		-DOGRE_PROFILING=$(usex profile)
164
		-DOGRE_RESOURCEMANAGER_STRICT=$(usex resman-pedantic 1 2)
106 165
	)
166
#		-DOGRE_BUILD_RENDERSYSTEM_GLES2=$(usex gles2)
167
#		-DOGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT=$(usex gles2 $(usex cg) no)
168
#		-DOGRE_CONFIG_ENABLE_GLES3_SUPPORT=$(usex gles2)
107 169

  
108
	if use threads ; then
109
		local f
110
		for f in boost poco tbb ; do
111
			use ${f} || continue
112
			mycmakeargs+=( -DOGRE_CONFIG_THREAD_PROVIDER=${f} )
113
			break
114
		done
115
	fi
170
	cmake_src_configure
171
}
116 172

  
117
	if use examples ; then
118
		# bug #829253
119
		append-cxxflags -std=c++14
120
	fi
173
src_compile() {
174
	cmake_src_compile
121 175

  
122
	cmake_src_configure
176
	if use doc ; then
177
		eninja -C "${BUILD_DIR}" OgreDoc
178
	fi
123 179
}
124 180

  
125 181
src_install() {
......
136 192
	dosym "${CONFIGDIR}"/resources.cfg "${SHAREDIR}"/resources.cfg
137 193

  
138 194
	# These are only for the sample browser
139
	insinto "${SHAREDIR}"
140
	doins "${BUILD_DIR}"/bin/quakemap.cfg
141
	doins "${BUILD_DIR}"/bin/samples.cfg
195
	if use examples ; then
196
		insinto "${SHAREDIR}"
197
		doins "${BUILD_DIR}"/bin/samples.cfg
198
		doins "${BUILD_DIR}"/bin/tests.cfg
199
	fi
200
}
201

  
202
pkg_postinst() {
203
	elog "If you experience crashes when starting /usr/bin/SampleBrowser,"
204
	elog "remove the cache directory at:"
205
	elog "  '~/.cache/OGRE Sample Browser'"
206
	elog "first, before filing a bug report."
142 207
}
Спасибо!